Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Ruby Basics (Retired) Ruby Methods Method Returns: Part 2

I need help with a challenge I'm doing.

I need help with a challange involving Ruby Methods.

def mod(a, b) puts "The remainder of #{a} divided by #{b} is c. end

mod It's saying wrong number of expected arguments

method.rb
def mod(a, b)
  puts "The remainder of #{a} divided by #{b} is c"
end

mod
Will Taylor Smith
Will Taylor Smith
1,370 Points

Hi Mario,

Firstly, in your code c is not defined. So I would start by defining c according to the prompt.

Secondly, the challenge calls for you to return the sentence, not puts.

With those 2 things in mind, give it another try! Otherwise, I can explain it further if needed.

1 Answer

Angela Huffman
PLUS
Angela Huffman
Courses Plus Student 10,242 Points

Return, versus puts tripped me up today, too.

Gotta watch the specific language in the prompt.