iOS Functions in Swift Functions in Swift Recap: Functions

Help please, I am not getting any errors, but the solution is not getting accepted. Need your help please.

My Treehouse friends, can you help.

Thank you!

John

functions.swift
// Enter your code below
// Enter your code below
func temperatureInFahrenheit(temperature: Double) -> Double  {


    let fahrenheitTemp = temperature * 9 / 5 + 32

    return fahrenheitTemp
}

temperatureInFahrenheit(temperature: 24.0)

1 Answer

Jeff McDivitt
Jeff McDivitt
23,964 Points

I feel the task is very confusing; anyway you have the correct concept just not the let constant that the task is looking for:

func temperatureInFahrenheit(temperature: Double) -> Double {

let temperature = temperature * 9 / 5 + 32
return temperature

}