Question: 4.9 Lab: Temperature Converter Create a program that converts Celsius to Fahrenheit or Fahrenheit to Celsius (depending on user input). Make sure you use the

4.9 Lab: Temperature Converter

Create a program that converts Celsius to Fahrenheit or Fahrenheit to Celsius (depending on user input). Make sure you use the correct datatype that would allow a floating point number to be inputted.

Formulas

F = (C * 9/5) + 32

C = (F - 32)(5/9)

Design your program to match the sample output below:

Sample Execution 1

Please enter the temperature: 0 Is your temperature currently (C)elsius or (F)ahrenheit: C 0.00 degrees Celsius = 32.00 degrees Fahrenheit 

Sample Execution 2

Please enter the temperature: 32 Is your temperature currently (C)elsius or (F)ahrenheit: F 32.00 degrees Fahrenheit = 0.00 degrees Celsius 

Sample Execution 3

Please enter the temperature: 22.2 Is your temperature currently (C)elsius or (F)ahrenheit: C 22.20 degrees Celsius = 71.96 degrees Fahrenheit 

Hints

Use a formatted print statement to print out your values with 2 significant digits after the decimal point

This is in Python 3.x, been stuck on this for a while, help would be highly appreciated!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!