Write a Python program that does the following: 1. Prompt the user to enter the Celsius,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a Python program that does the following: 1. Prompt the user to enter the Celsius, which is a float number. 2. Prompt the user to enter a choice which is an integer, 1 for yes, 0 for no, any other number will be considered as error. the user enters 1: Using an if/elif/else control structure, do the following: 3. If temperature in Celsius is less than 20 then assign to the variable status the value Cold weather 4. If Temp is from 20-30 then assign Normal to the variable status. 5. If Temp is larger than 30, then assign Hot to the variable status. 6. Using f'string display the Celsius given by the user, the equivalent in Fahrenheit, Rankine (R) and the status (use only one print). the user enters 0, the program should display only the Celsius given by the user, the equivalent in heit, Rankine (R) (without the status). - any other number, the system should display the message 'error, please enter 1 or 0'. ote:Fahrenheit -Celsius * 1.8 +32 and Rankine 9/5 (Celsius + 273.15) The output should be as below: enter a choice: 1 for 'YES' e for 'NO' 1 the temperature in Celisus-39.0, Fahrenheit-102.2,Rankine-561.87, and the status is Hot. enter a number5 enter a choice: 1 for 'YES' for 'NO' 45 error, please enter 1 or 0 enter a number19 enter a choice: 1 for 'YES' for 'Ne' 8 the temperature in Celisus-19.0, Fahrenheit=66.2, Rankine-525.87 Write a Python program that does the following: 1. Prompt the user to enter the Celsius, which is a float number. 2. Prompt the user to enter a choice which is an integer, 1 for yes, 0 for no, any other number will be considered as error. the user enters 1: Using an if/elif/else control structure, do the following: 3. If temperature in Celsius is less than 20 then assign to the variable status the value Cold weather 4. If Temp is from 20-30 then assign Normal to the variable status. 5. If Temp is larger than 30, then assign Hot to the variable status. 6. Using f'string display the Celsius given by the user, the equivalent in Fahrenheit, Rankine (R) and the status (use only one print). the user enters 0, the program should display only the Celsius given by the user, the equivalent in heit, Rankine (R) (without the status). - any other number, the system should display the message 'error, please enter 1 or 0'. ote:Fahrenheit -Celsius * 1.8 +32 and Rankine 9/5 (Celsius + 273.15) The output should be as below: enter a choice: 1 for 'YES' e for 'NO' 1 the temperature in Celisus-39.0, Fahrenheit-102.2,Rankine-561.87, and the status is Hot. enter a number5 enter a choice: 1 for 'YES' for 'NO' 45 error, please enter 1 or 0 enter a number19 enter a choice: 1 for 'YES' for 'Ne' 8 the temperature in Celisus-19.0, Fahrenheit=66.2, Rankine-525.87
Expert Answer:
Answer rating: 100% (QA)
Heres a Python program that implements the described functionality def calculatestatusanddisplaycels... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
You purchased shares of Disney ten years ago that cost $1000 in total. Today the shares are worth $2800. What is the annualized rate of return on the shares of Disney? Note: This is an investment...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
The electric field component of an electromagnetic wave traveling in a vacuum is given by Ey = Eo sin (kx - wt), where E = 300 V/m and k=107m. What are the frequency of the oscillations (in Hz) and...
-
Under what circumstances can partners with passive losses from partnerships deduct their passive losses?
-
The rectangular gate of width w is pinned at its center A and is prevented from rotating by the block at B. Determine the reactions at these supports due to hydrostatic pressure. Units Used: Mg = 103...
-
What is the purpose of the pumping lemma in case of regular language? Use the pumping lemma to show that {012n| n is the multiple of your first name length} is not regular. a) Give a leftmost...
-
Consider a total return swap of a coupon bond versus a fixed-rate payment. Discuss whether the payoff is path dependent.
-
At December 31, MediSharp Precision Instruments owes $50,000 on accounts payable, salary payable of $16,000, and income tax payable of $8,000. MediSharp also has $280,000 of bonds payable that were...
-
Use game theory to model everyday interactions. Suppose you and a partner play the following game. You both are situated with your backs to each other, 20 feet apart. You have a basketball and a...
-
Cherry Cotta makes custom ordered clay pots for residential gardens. Below is cost information regarding its latest job. a. Materials were purchased on account. $18,996 purchased b. A materials...
-
Explain the impact of social media on business. thoughts, opinions, and indications. with reference.
-
Kennedy Company has the following portfolio of trading investments at December 31, 2015. On December 31, 2016, Kennedys portfolio of trading investments consisted of the following investments. At the...
-
On January 1, 2015, Jennings Company purchased at par 10% bonds having a maturity value of 300,000. They are dated January 1, 2015, and mature January 1, 2020, with interest receivable December 31 of...
-
Assume the same information in E16-1, except that Angela Corporation converts its convertible bonds on January 1, 2016. Instructions (a) Compute the carrying value of the bond payable on January 1,...
-
Englehart Co. provides the following information about its postretirement benefit plan for the year 2015. Instructions Compute the postretirement benefit expense for 2015. Service cost Contribution...
-
For each of the unrelated transactions described below, present the entry(ies) required to record each transaction. 1. Coyle Corp. issued 10,000,000 par value 10% convertible bonds at 99. If the...
-
Ethan is the leader of a team with N members. He has assigned an error score to each member in his team based on the bugs that he has found in that particular team member's task. Because the error...
-
The Thomas Corporation was organized on Jan. 1, 2020. On Dec. 31, 2021, the corporation lost most of its inventory in a warehouse fire before the year-end count of inventory was to take place. just...
-
On February 2, 2012, Alexandra purchases a personal computer for her home. The computer cost $3,000. Alexandra uses the computer 80 percent of the time in her accounting business, 10 percent of the...
-
Joan is a self-employed attorney in New York City. Joan took a trip to San Diego, CA, primarily for business, to consult with a client and take a short vacation. On the trip, Joan incurred the...
-
Laura is a single taxpayer living in New Jersey with adjusted gross income for the 2012 tax year of $35,550. Laura's employer withheld $3,300 in state income tax from her salary. In April of 2012,...
-
As the new controller, reply to the following comment made by your plant manager: When I employ a proper accounting software, which can process all my daily accounting records and provide me with all...
-
How is financial accounting different from management accounting?
-
Hannah Gilpin is the controller of Blakemore Auto Glass, a division of Eastern Glass and Window. Her division has been under pressure to improve its divisional operating income. Currently, divisions...
Study smarter with the SolutionInn App