DML School of Technology
Menu

First steps, Numbers

Celsius to Fahrenheit

The task

Convert a temperature from Celsius to Fahrenheit: multiply by 9, divide by 5, then add 32.

Write a function called to_fahrenheit.

Tests

CallExpectedYours
to_fahrenheit(0) 32 not run
to_fahrenheit(100) 212 not run
to_fahrenheit(-40) -40 not run
to_fahrenheit(25) 77 not run
to_fahrenheit(37) 98.6 not run

Next challenge · All challenges

solution.py

Tab indents. To leave the editor, press Escape, then Tab.

Output

Run prints what your code prints. Run the tests to check your function.