Fahrenheit for Every Day

Python for AIEasy+10 XP+10

Fahrenheit for Every Day

A weather app stores a week of temperatures in Celsius. Your American friend wants them in Fahrenheit.

Write to_fahrenheit(celsius_temps). It returns a new list with every temperature converted, in the same order.

The rule for one temperature is: fahrenheit = celsius * 9 / 5 + 32.

  • Don't change the list you were given.
  • An empty list gives back an empty list.

Examples

celsius_temps = [0, 100]
returns [32.0, 212.0]
celsius_temps = [20, 25, 30]
returns [68.0, 77.0, 86.0]

Hints

Solve it to unlock the solution

Once your code passes every test, a reference solution shows up here so you can compare it with yours.

solution.py
CtrlEnterto run