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)
![jc laurent](https://secure.gravatar.com/avatar/d5305a71826da2592ec4862a5fcd06c3?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
jc laurent
6,351 Pointsworking in playground but not here?
why is it bugging?
// Enter your code below
func temperatureInFahrenheit(temperature: Double) -> Double {
let fahrenheitValue = temperature * 9 / 5 + 32
return fahrenheitValue
}
let fahrenheitTemp = temperatureInFahrenheit(temperature: 24)
6 Answers
![jc laurent](https://secure.gravatar.com/avatar/d5305a71826da2592ec4862a5fcd06c3?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
jc laurent
6,351 PointsWaow, things are so clear when you explain them. thks
![Kevin Elliott](https://secure.gravatar.com/avatar/f36a3d6a839ba2562c08af5793e68748?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Kevin Elliott
15,653 PointsYour code is failing because you are specifying the parameter name temperature when calling temperatureInFahrenheit. Even though you have an internal parameter name defined in your function, you have not specified an external parameter name. Only when you have defined an external parameter name will you be able to call the function with the parameter names explicitly.
Example with external parameter name:
func exampleFunction(thing thing: String) -> String {
return thing
}
exampleFunction(thing: "Hello")
Example with no external parameter name:
func exampleFunction(thing: String) -> String {
return thing
}
exampleFunction("Hello")
Remove the explicit call to the parameter name in your function call and your task will pass.
![jc laurent](https://secure.gravatar.com/avatar/d5305a71826da2592ec4862a5fcd06c3?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
jc laurent
6,351 PointsHi Kev, Doesn't change nothing if I'm adding an external but still having this error: swift_lint.swift:8:45: error: extraneous argument label 'temperature:' in call let fahrenheitTemp = temperatureInFahrenheit(temperature: 24)
![Kevin Elliott](https://secure.gravatar.com/avatar/f36a3d6a839ba2562c08af5793e68748?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Kevin Elliott
15,653 PointsHey JC, you just need to remove it, and do the second example I showed.
![jc laurent](https://secure.gravatar.com/avatar/d5305a71826da2592ec4862a5fcd06c3?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
jc laurent
6,351 PointsHi Kev, that's not what I've done?
![Kevin Elliott](https://secure.gravatar.com/avatar/f36a3d6a839ba2562c08af5793e68748?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Kevin Elliott
15,653 PointsNope! But that's ok. Look at my two examples again, closely. The second one is the one you want.
![jc laurent](https://secure.gravatar.com/avatar/d5305a71826da2592ec4862a5fcd06c3?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
jc laurent
6,351 Pointswhere is so different?
![Kevin Elliott](https://secure.gravatar.com/avatar/f36a3d6a839ba2562c08af5793e68748?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Kevin Elliott
15,653 PointsThe call of the function does not have any named parameters. Just the value.
![jc laurent](https://secure.gravatar.com/avatar/d5305a71826da2592ec4862a5fcd06c3?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
jc laurent
6,351 Pointstemperature in the call function is not a parameter?
![jc laurent](https://secure.gravatar.com/avatar/d5305a71826da2592ec4862a5fcd06c3?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
jc laurent
6,351 PointsHi Bud I thks you anyway for your kind of help but it would have been so simple saying (because I love to understand) that in playground you call the function with the parameter but not in the challenge, instead of playing mystery clue!
![Kevin Elliott](https://secure.gravatar.com/avatar/f36a3d6a839ba2562c08af5793e68748?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Kevin Elliott
15,653 PointsAhh, was not trying to be mysterious. My point is that if you define an external parameter name in your function definition, then you need to provide it when you actually call the function. And when you do not have an external parameter named, then you can not provide it when you call the function. My two examples illustrate that.
If this is not behaving properly in Playground, that seems like something is wrong with the playground you have.
![Kevin Elliott](https://secure.gravatar.com/avatar/f36a3d6a839ba2562c08af5793e68748?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Kevin Elliott
15,653 PointsIt has nothing to do with being in your project or being in the Playground. It has everything to do with how you define your function.