Codington
0 of 6 problems solved • 0%

Exercise prompt

Format a Sensor Reading

An f-string can format numbers as well as insert names. Inside braces, :.1f displays a number with one digit after the decimal point.

Example

cost = 3.5 print(f"Two tickets cost {2 * cost:.2f} euros") # Two tickets cost 7.00 euros

The expression gives 7.0. The format after the colon controls how many decimal places appear in the text.

Your task

Build label from the cleaned station name, temperature rounded to one decimal place, and the unit C. With the starter values the result should be North: 7.3 C.