Ruby Ruby Basics Ruby Syntax Method Return Values

Christopher Davis
Christopher Davis
8,555 Points

I'm confused by how to always return the number 3 or 5 here.

I'm asked to define a method that will always return the number 3, and another that will always return the number 5. Neither method should take any arguments. I can't get it to work. Can I get some help?

methods.rb
def three(number)
  puts number
end

def five(number)
  puts number
end

three(3)
five(5)

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 44,312 Points

There are no arguments so number is out. It may be simpler than you think. Have you tried return 3?