Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

plz answe all Write a program (h1_2.py) - This program must prompt the user for a temperature in Fahrenheit, convert that temperature to Celsius and

plz answe all
image text in transcribed
Write a program (h1_2.py) - This program must prompt the user for a temperature in Fahrenheit, convert that temperature to Celsius and print the Celsius temperature. - The Celsius temperature must be an integer. - Then the program must print a blank line. - The program must now prompt the user for a temperature in Celsius, convert that number to Fahrenheit and print the Fahrenheit temperature. - The Fahrenheit temperature must be an integer Suggestions Write this script in stages, testing your script at each step 1. Write an assignment statement which asks the user for a temperature in Fahrenheit. Write a print statement to print out the Fahrenheit value. Save the file and quit. Run the script to make sure it works properly. If it does not work, fix the problem. 2. Write an assignment statement that calculates the Celsius temperature using the value of the Fahrenheit temperature. The left hand side of the assignment statement should be a variable that will hold the Celsius temperature, while the right hand side is a formula to that calculates the Celsius temperature using the Fahrenheit variable. Write a print statement to print the Celsius value. Save the file and quit. Run the script to make sure it works properly. A Fahrenheit value of 40 should give a Celsius value of 4 . If it does not work, fix the problem. 3. Repeat the above steps for the Celsius to Fahrenheit conversion. Output: You should see something like Please enter the temperature in Fahrenheit: 40 You entered 40 degrees Fahrenheit 40 degrees Fahrenheit is 4 degrees Celsius Please enter the temperature in Celsius: 4 You entered 4 degrees Celsius 4 degrees Celsius is 39 degrees Fahrenheit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Neo4j

Authors: Gregory Jordan

1st Edition

1484200225, 9781484200223

More Books

Students also viewed these Databases questions

Question

What is management growth? What are its factors

Answered: 1 week ago