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 trialDurus Mihai
2,660 PointsA function for remainder not working
I really don't get whats wrong in my code, i need some help, ty!
// Enter your code below
func getRemainder (a value: Int, b divisor: Int) -> Int
{
return a % b
}
2 Answers
Jennifer Nordell
Treehouse TeacherHi there! You're very close here. So I'm just going to give some hints. The function of the definition should have two parameters of type Int with an external name and an internal name. The external names are value
and divisor
. The internal names are a
and b
. The external names should be written first and then the internal names. You've gotten this part backwards. Try changing the order here.
I think you can get it with this hint, but let me know if you're still stuck!
Durus Mihai
2,660 PointsOh:)), now i understand why it kept giving me errors, ty ?