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?
-
Refer to Exercise 3. a. Calculate the covariance between X1 = the number of customers in the express checkout and X2 = the number of customers in the super express checkout. b. Calculate V(X1 + X2)....
-
Why might the taxing authority agree to provide advance rulings on the tax treatment of proposed transactions? Why might it refuse to make rulings in some cases?
-
Why is the general management position the ultimate corporate job in our economic system?
-
Earth Company expects to operate at 80% of its productive capacity of 25,000 units per month. At this planned level, the company expects to use 40,000 standard hours of direct labor. Overhead is...
-
\f
-
In problem 8.16, a college chemistry instructor thinks the use of embedded tutors will improve the success rate in introductory chemistry courses. The instructor carried out a hypothesis test and...
-
1- Could you prediet the activity of the following compounds? HN COOH A CH(CHah HO HO
-
A company reports the following for one of its products. Direct materials standard (4 pounds @ $3 per pound) Actual units produced Actual cost of direct materials used $ 12 per unit 90,000 units $...
-
Carbon dioxide (CO2) fills a closed, rigid tank fitted with a paddle wheel, initially at 80\ deg F, 50 lbf/in 2, and a volume of 1.6 ft3. The gas is stirred until its temperature is 500\deg F. During...
-
A shoe manufacturer is evaluating new equipment that would custom fit athletic shoes. The new equipment costs $107,000 and will generate $43,000 in net cash flows for five years. Note: Negative...
-
The company has 200 000 non-redeemable preference shares in issue with a par value R100. Preference dividends are payable annually in arrears. The non-redeemable preference shares are currently...
-
Consider a firm planning to expand sales by $36m/year. It requires additional facilities of $2m. Typically, the firm produces with 90 days of inventory (largely raw materials). The firm offers its...
-
i. Comment whether the sequence is Converges or diverges. ii. Obtain the first five terms of that sequence. 1 0 'p np ph
-
Willingness to pay as a measure of a person's value for a particular good measures the maximum a person would be willing to pay requires that payment actually be made depends on the satisfaction that...
-
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,...
-
The Supplies account began the year with a balance of $380. During the year, supplies in the amount of $980 were purchased. At the end of the year (December 31), the inventory of supplies on hand was...
-
Consider Graph 4 and Graph 6 in the given figure. Determine if one graph is a subgraph of the other. If so, give a correspondence between vertices that demonstrates this relationship. If not,...
-
For the following exercise, use Graph \(A\) in the given figure. Consider each sequence of vertices. Determine if it is only a walk, both a walk and a path, both a walk and a trail, all three, or...
Codes Of Finance Engineering Derivatives In A Global Bank 1st Edition - ISBN: 0691163952 - Free Book
Study smarter with the SolutionInn App