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 trialBen Mohammad
5,659 PointsDon't wanna smash my laptop even though I want a mac.
Don't understand how I add c to the equation , someone elaborate plzzzzzzzzzzzz
def mod(a, b)
puts "The remainder of #{a} divided by #{b} is #{c}"
return c = a % b
end
1 Answer
Kieran Black
9,139 PointsHi Ben,
No need to smash up your laptop as you are nearly there,. This challenge wants your mod() method to return the value not print it to the screen. You also need a period (.) at the end of your sentence.
Something like:
def mod(a, b)
c = a % b
return "The remainder of #{a} divided by #{b} is #{c}."
end
Hope this helps. Happy coding
KB
Ben Mohammad
5,659 PointsBen Mohammad
5,659 Pointsthanks KB