Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

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

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
Angela Huffman
Courses Plus Student 10,159 Points

Return, versus puts tripped me up today, too.

Gotta watch the specific language in the prompt.