## 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!

### 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. def mod(a, b) puts "The remainder of #{a} divided by #{b} is #{a % b}" return a % b end puts mod(5, 3)

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

end
mod(13, 6)
```

Nasreldin, you didn't finish the string, nor did you return it:

```def mod(a, b)
return "The remainder of #{a} divided by #{b} is #{a % b}."  //must be return not puts, needs to show remainder

end
```

Thanks very much! STAFF

Hi there! There's a couple of things going on here. First, you never compute the remainder that it's asking for. Now you can do this a couple of ways. You can either set up a variable named c first, or you can send back the calculation directly. But the big thing here lies in the instructions of the challenge. It says to return the string, not print it.

Calculating inside the string:

```def mod(a, b)
return "The remainder of #{a} divided by #{b} is #{a%b}."
end
```

Calculating using another variable:

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

The strings will be identical whichever way you prefer to go. Hope this helps! Thanks very much. I did help!

Patrick, as you know, methods can do different things. They can display text to the console (puts), they can return a value, which the code that calls the method can use, or display, etc.

In this particular case the reasoning for using return rather than puts is that the challenge asked for it: "it would be nicer if the method returned the remainder in a nice full sentence."

Without the return the editor won't accept the code.