iOS Functions in Swift Functions in Swift Recap: Functions

Nigel Matheson
PRO
Nigel Matheson
Pro Student 1,166 Points

My code is not working

Somehow I think i'm on the wrong track and I need someone to break this down for me.

Thanks

functions.swift
// Enter your code below
func temperatureInFahrenheit (celious: 9, fahrenheight: 5) --> Double

{

let temperature = celious * fahrenheight /5 + 32
let Fahrenheight = celiousToFahrenheight
return celiousToFahrenheight
return temperature

}

2 Answers

Jeff McDivitt
Jeff McDivitt
23,964 Points
  1. You function needs to only take single parameter named temperature of type double
  2. You have an extra dash in your return statement
  3. You need to return what the tasks asks
func temperatureInFahrenheit(temperature: Double) -> Double {

return temperature * 9 / 5 + 32

}