Write a program that prompts the user for their quarterly water bill for the last four...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that prompts the user for their quarterly water bill for the last four quarters. The program should find and output their average monthly water bill. If the average bill exceeds $75, the output should include a message indicating that too much water is being used. If the average bill is at least $25 but no more than $75, the output should indicate that a typical amount of water is being used. Finally, if the average bill is less than $25, the output should contain a message praising the user for conserving water. To solve this exercise, use an accumulator (don't use four variables to save four quarterly water bills). Refer to Section 5.7 in your Textbook. Also, use a for-loop to input the user's quarterly water bill values and update the accumulator. Here's an example of execution for this program: Input your waterbill for quarter 1: 120 Input your waterbill for quarter 2: 99 Input your waterbill for quarter 3: 115 Input your waterbill for quarter 4: 122.47 Your average monthly bill is $38.04 You are using a typical amount of water! Write a program that prompts the user for their quarterly water bill for the last four quarters. The program should find and output their average monthly water bill. If the average bill exceeds $75, the output should include a message indicating that too much water is being used. If the average bill is at least $25 but no more than $75, the output should indicate that a typical amount of water is being used. Finally, if the average bill is less than $25, the output should contain a message praising the user for conserving water. To solve this exercise, use an accumulator (don't use four variables to save four quarterly water bills). Refer to Section 5.7 in your Textbook. Also, use a for-loop to input the user's quarterly water bill values and update the accumulator. Here's an example of execution for this program: Input your waterbill for quarter 1: 120 Input your waterbill for quarter 2: 99 Input your waterbill for quarter 3: 115 Input your waterbill for quarter 4: 122.47 Your average monthly bill is $38.04 You are using a typical amount of water!
Expert Answer:
Answer rating: 100% (QA)
Here is a Python program that implements the described functionality pyt... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
The intensity of the sound of traffic at a busy intersection was measured at 6.0 x 10-1 W/m2. Find the decibel level. (Round your answer to the nearest whole number.) x dB 48
-
20 What are the disadvantage of using machining processes ? 22 What are the three types of joining processes?
-
You are the Pricing Manager for Region 1 Cable System. You received the memo below from the Regional Manager of Region 1 requesting for your recommendation. Details of the memo as are below: We...
-
Discuss Planning & Preparation in relation to: Preparing work documents and performing document review Preparing an audit plan
-
Wipro Limited, together with its subsidiaries and equity accounted investees (collectively, Wipro) is a leading India-based provider of IT Services, including Business Process Outsourcing (BPO)...
-
In its first year of operations, Anya Company recognized $30,000 in service revenue, $4,800 of which was on account and still outstanding at year-end. The remaining $25,200 was received in cash from...
-
MacRae Company merchandises a single product called Sooto. The following data represent beginning inventory and purchases of Sooto during the past year: January 1 inventory, 68,000 units at $11.00;...
-
At December 31, 2015, Grand Company reported the following as plant assets. During 2016, the following selected cash transactions occurred. April 1 Purchased land for $2,130,000. May 1 Sold equipment...
-
please help with these asap thank u 2. [6 marks] Find a polynomial f with the following properties: i) f has points of inflection at x = 0 and r = 3 (i.e. f"(0) = f"(3) = 0). ii) f" (1) = -24. iii) f...
-
What is the current, i? 452 V1-2V M 852 V2-3V M None of the choices 0.25 A -0.25 A 0.28 A -0.88 A 0.88 A IN 852 if IDEAL Vo
-
Give an example of a partnership between a sponsor and a sport property that has a social responsibility element. How might this partnership benefit the sponsor? Explain the concept of "fit" when it...
-
120.Discuss the alternative methods (E-mail, EDI, and Internet) of conducting electronic commerce. 121.Explain how the Internet and PCs could be used in a college course such as AIS to eliminate all...
-
Outline the organisational implementation methods to facilitate improvements in organisational and workplace policies and procedures.
-
Can the aisle configuration in the warehouse be changed to acheive better picking effeciency?Explain
-
1. What ethical dilemmas/scandals, crises has Etsy faced in the past 5 years? How has the CEO reacted to, managed, been involved with said dilemmas? Was this response adequate? Why or why not?
-
A Jim le gustara iniciar un negocio de cra de caballos decarreras de pura sangre. El negocio sera el primero de su tipo enel estado donde vive. Obtener un seguro para los caballos es unapreoc 1 answer
-
Coastal Refining Company operates a refinery with a distillation capacity of 12,000 barrels per day. As a new member of Coastal's management team, you have been given the task of developing a...
-
The Danner Corporation reported the following accounting income before income taxes, income taxes expense, and net income for 20x6 and 20x7: On the balance sheet, deferred income taxes liability...
-
Contingent Liabilities Several items are listed for which the outcome of events is unknown at year-end. a. A company has been sued by the federal government for price fixing. The companys legal...
-
Using the corporate tax rate schedule in Table 1, compute the income tax liability for the following situations: Situation Taxable Income A $ 70,000 B 85,000 C 320,000 Income Tax Allocation
Study smarter with the SolutionInn App