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 trialCraig Shukie
8,839 PointsWhat's wrong with my code?
I've just completed this code challenge however it says that my work is wrong?
I've copied my code into a work space and running it there works fine?
Can someone please help?
def mod(a, b)
c = a % b
return puts "The remainder of #{a} divided by #{b} is: #{c}"
end
1 Answer
jason chan
31,009 Pointsdef mod(a, b)
c = a % b
"The remainder of #{a} divided by #{b} is #{c}."
end
you don't need return or puts.
Craig Shukie
8,839 PointsCraig Shukie
8,839 PointsHi Jason, thanks for the quick response!
Ive copied your code but it still says its incorrect? I get the error "Double check your spelling and punctuation"
aNy other ideas?
Craig Shukie
8,839 PointsCraig Shukie
8,839 PointsIgnore me id spelt remainder incorrectly! thanks again!