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

iOS Swift 2.0 Functions Function Parameters Function Parameters

SONU PRABHAKAR
SONU PRABHAKAR
2,039 Points

help me to solve challenge task 2. question is mentioned in snippet.

solve it...

functions.swift
// Enter your code below
func getRemainder (value a : Int, divisor b : Int) -> Int {
return a % b
}
let result = getReminder (value : 10, divisor: 3)

//Now that we have a working function let's use it.

//Call the function and pass in a value of 10 for the first parameter and 3 for the second.

//Assign the result of the function operation to a constant named result.
Jose Patarroyo
Jose Patarroyo
2,953 Points

Hello SONU. The way I see it, you y¡just misspelled the name of the function. Just change getReminder to getRemainder when you assign the value to result and it should work

2 Answers

Jose Patarroyo
Jose Patarroyo
2,953 Points

Hello SONU. The way I see it, you y¡just misspelled the name of the function. Just change getReminder to getRemainder when you assign the value to result and it should work

Bjørn Jostein Knutsen
Bjørn Jostein Knutsen
7,857 Points

You have getRemainder and getreminder in the other, also you should not have space between names and values