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.

DOHOON KIM
7,669 PointsI am not sure what I am doing wrong
def mod(a, b) print a % b end
I am confused as to why this is not the correct solution for getting a remainder of a when divided by b
def mod(a, b)
print a % b
end
1 Answer

Kevin Korte
28,109 PointsIt's asking you to return the remainder, not print it

DOHOON KIM
7,669 PointsTy that fixed it

Kevin Korte
28,109 PointsYou're welcome
Ariel Espinal
5,451 PointsAriel Espinal
5,451 PointsFrom what I understand, the print function is used primarily to print strings on your screen, it does not do any math. However you can print out a VARIABLE* containing math operations.
Or you can use the return function to return a value.