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

Hi, I need help with solving a problem that I been stuck on for awhile and would like someones help ? Please

Make sure your function accepts two parameters, named a and b, of type Int with the correct external parameter names

functions.swift
// Enter your code below
func getRemainder(a: Int , b: Int) -> Int {

     getRemainder(a: value, b: divisor)




} 

2 Answers

Hi - Three things: 1 - yes, Thorsten is correct about calling the function from outside - but that is the last thing to do, first off... 2 - you need to name your inputs a & b, otherwise value and divisor are meaningless; 3 - you need to declare a constant and return it using the % operator; 4 - now go back to 1 and call the function from outside, inserting the values as desired;

Hope this helps! Cheers {P}

hi. i Think the problem is in the function. you want call the function, so you have to call it outside the function. not inside.

Please have a closer Look at your Parentheses;) Hope this Helps

Greets Thorsten

It worked well, Thank You Thorsten and paulvdg!!