Fahrenheit to Celsius Converter
Beginner · Write the code · from Python Numbers: Integers, Floats, and Math You'll Actually Use
From the lesson: Python Numbers: Integers, Floats, and Math You'll Actually Use
You're splitting a restaurant bill with three friends. The total is $85. How much does each person owe? You grab your phone calculator, but a Python programmer just types 85 / 4 and gets the answer instantly.
Read the lessonConvert a temperature from Fahrenheit to Celsius using this formula:
**Celsius = (Fahrenheit - 32) * 5 / 9**
A variable fahrenheit is given with the value 72. Calculate the Celsius value, round it to 1 decimal place, and print:
72F = 22.2Cfahrenheit = 72
# Convert to Celsius using the formula
# Round to 1 decimal place
# Print the result
More Numbers exercises
- Calculate the Total CostBeginner
- Even or Odd CheckerBeginner
- Fix the Bug: Wrong DivisionBeginner
- Predict the OutputBeginner
- Compound Interest CalculatorBeginner
All Python exercises · 50 practice problems · Python Fundamentals quiz