Problem 196030 · easy · Phase 01 Prerequisites & Setup

Forecast in Fahrenheit

lists · mapping · arithmetic

A weather feed gives temperatures in Celsius. Write to_fahrenheit(celsius) that returns a new list with each value converted to Fahrenheit using F = C * 9 / 5 + 32, rounded to 1 decimal place.

Examples

Input:  celsius = [0, 100, -40]
Output: [32.0, 212.0, -40.0]

Input:  celsius = [36.6]
Output: [97.9]

Constraints

  • 0 <= len(celsius) <= 5000

Goals

  • Transform every item of a list into a new list
  • Round each result to one decimal place
Starting Python…