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 trialNigel Matheson
Courses Plus Student 1,166 Pointsnot working for me
Not having much luck with this code.
Please help
// Enter your code below
func getRemainder(value a: int, divisor b: int) -> int {
return a % b
}
4 Answers
Nico Schmidt
12,781 PointsYou are almost there. You want to capitalise Int.
Luc Bernardin
3,726 PointsTypes in Swift always use upper camel case. Declaring a variable or constant of type string with i.e. let a: string will not work, in this case it would be declared with let a: String
Now apply this to your problem where you declare and return integers.
Nico Schmidt
12,781 PointsIs it not how I said it? In your code example it is lower camel case.Am I missing the point?
Luc Bernardin
3,726 PointsYes Nico, i simply gave more explanation and more info on what was wrong and how to fix it without giving the answer straight away.
Nico Schmidt
12,781 PointsSorry, that is fine. I confused you with Nigel.
Nigel Matheson
Courses Plus Student 1,166 PointsThank you guys