Skip to content

Names and values · warm-up

Celsius to Fahrenheit

Write to_fahrenheit(celsius) that returns the temperature in Fahrenheit: multiply by 9, divide by 5, add 32.

This is your first function: the grader calls it with different numbers and checks what it gives back with return.

Run adds print(to_fahrenheit(100)) after your code, to try it.

Stuck on the idea rather than the code? The Names and values lesson walks through it.