## 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.

# Functions Code Challenge Help

So I ended up finishing and completing the code challenge correctly, but I'm not sure why my code works.

Questions:

Why don't we have two separate variables for temperature in Celsius and temperature in Fahrenheit?

How can temperature be equal to temperature times 9, divided by 5, plus 32?

Lastly, what does 'return temperature' do for us in this case?

BTW, this is the completed and correct code for the challenge

Thanks

functions.swift
func temperatureInFahrenheit(temperature: Double) -> Double  {

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

}

let fahrenheitTemp = temperatureInFahrenheit(temperature:24)