Due: Monday, September 12, 11:00 AM
Write a program called
c2f.py that can convert Celsius to Fahrenheit.
You should prompt the user for the current temperature in Celsius, then print out the corresponding temperature in Fahrenheit (recall that 5(F − 32) = 9 C). An example run of the program might look like:
What is the temperature in Celsius? 31
It is 87.8 degrees Fahrenheit
Another run might look like:
What is the temperature in Celsius? 100
It is 212.0 degrees Fahrenheit
One quick hint: Consider that you might need to use
float to get decimal numbers. Also, if you are having issues with decimal places, check out the
format() function found in Section 2.8 of the Gaddis book.
Please match our prompts, etc, exactly. Your program should work for any integer Celsius temperature we provide.
Submission: Please submit one .py file named
c2f.py to the POTD submission system at https://archimedes.cs.virginia.edu/cs1110/.