Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
Write a program that reads a temperature in degrees Celsius and shows it in degrees Fahrenheit, with . What does it show for ?
Read with float(), apply the formula, and round the answer.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Plan. Read the temperature as a float, apply the formula, and round the answer.
celsius = float(input("Temperature in degrees Celsius: "))fahrenheit = celsius * 9 / 5 + 32. The multiplication and division come before the addition.Check. Water boils at , which is : . ✓
Answer: .
Log in to join the discussion.
Loading…