Skip to the content

Celsius to Fahrenheit

Problem

Write a function that turns degrees Celsius into Fahrenheit. The formula: multiply by 9, divide by 5 and add 32.

Examples

  • 0 → 32

  • 100 → 212

  • -40 → -40

Besides these, the challenge has hidden tests that are revealed when you submit your solution.

You start with this

Python

def to_fahrenheit(celsius):
    pass

JavaScript

function toFahrenheit(celsius) {
}
Solve this challenge

It opens in your browser, with the editor and the tests. It is free and you do not need an account to start.

More O(1) challenges

See all challenges →