Question
Create a Python function that does the following: Is passed the temperature in Celsius as an argument, coverts that temperature to Fahrenheit and prints its
Create a Python function that does the following: Is passed the temperature in Celsius as an argument, coverts that temperature to Fahrenheit and prints its value Create a Python function that does the following: Is passed the temperature in Fahrenheit as an argument, coverts that temperature to Celsius and returns its value Create a Python program that uses both functions and does the following: Prompts the user to enter the temperature o Asks the user if the temperature has been entered in Fahrenheit or Celsius If the temperature was entered in Fahrenheit, the program should use the correct function to convert and print the equivalent value in Celsius If the temperature was entered in Celsius, the program should the program should use the correct function to convert and print the equivalent value in Fahrenheit If an invalid value is entered an error message should be displayed and the asked to re-enter correct data
Sample Output: What is the current temperature? 32 Did you enter the temperature in (c)elsius or (f) ahrenheit? a Invalid input, please try again! Did you enter the temperature in ( Celsius or (f) ahrenheit? G The current temperature is 32.0 celsius this temperature in fahrenheit is 89.60 What is the current temperature? 89.6 Did you enter the temperature in (c)elsius or (f)ahrenheit? f The current temperature is 89.6 fahrenheit this temperature in celsius is 32.00 entre you enter the dels us on. Mahrenheit? In celsiuStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started