1 Task

Write a program called c2f.py. When run, it should

  1. ask the user to type a temperature in Celsius
  2. print the corresponding temperature in Fahrenheit

Please match our prompts, etc, exactly. Your program should work for any numeric temperature that we provide.

2 Example Runs

2.1 Example 1

What is the temperature in Celsius? 31
It is 87.8 degrees Fahrenheit

2.2 Example 2

What is the temperature in Celsius? 100
It is 212.0 degrees Fahrenheit

3 Thought Question

Looking for more practice? Feel free to try (but not submit) the following:

  • Write a program that goes Fahrenheit to Celsius
  • Write a program that goes from Celsius to both Fahrenheit and Kelvin (and others if you want)
  • Write a program that does some other unit conversion, such as miles per gallon to inverse square meters
  • Write a program that does a multi-input conversation, such as

    What is the R-value of your insulation? 30
    How large is your wall, in square feet? 2400
    What is the outside temperature, in degrees Fahrenheit? 48
    Your wall loses heat at about 563 watts