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 trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Ben Santen](https://secure.gravatar.com/avatar/809de8ae88dbd26579284ca6ec5301f8?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ben Santen
1,998 PointsI don't see what is wrong in my code
I got help from Steve Hunter, but it was to complex, I need a simpler answer.
def mod(a,b)
return "The remainder of #{a} divided by #{b} is c:"
end
mod(5,2)
1 Answer
![Matt Buckingham](https://secure.gravatar.com/avatar/f3db98b2aed15ecd328ac76dc8682f8a?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Matt Buckingham
11,389 PointsAfter c: in the string you need to do the calculation to find the remainder of a divided by b, which would look like #{a % b}. Hope that helps!
Ben Santen
1,998 PointsBen Santen
1,998 PointsThank you Matt I have finally figured out my problem, I was stuck on it for 3 days, it was my last step in ruby basics.