03Celsius to Fahrenheit

    Very easymathfloats

    Write to_fahrenheit(c) that converts a temperature in Celsius to Fahrenheit.

    The formula is: F = C × 9 / 5 + 32.

    Examples

    Example 1
    >>> to_fahrenheit(0)
    32.0
    Example 2
    >>> to_fahrenheit(100)
    212.0

    Good to know

    • Small rounding differences are fine; the tests allow for them.

    Run examples checks the 2 examples above. Submit runs all 5 tests, including hidden edge cases, and marks the challenge solved.

    solution.py
    Loading Python…

    Test results show up here

    Write to_fahrenheit in the editor, then run the examples. Use print() freely: its output is shown for each test.