Question: Python Your local utility company charges customers for water usage on a tiered system: table [ [ Tier , Charge ] , [ Gallons
Python
Your local utility company charges customers for water usage on a tiered system:
tableTierChargeGallons $ per gallonsGallons $ per gallonsGallons over $ per gallons
No mater the total water usage, the first gallons cost $ per gallons. Any gallons from to then cost $ per gallons. Finally, any water usage left will cost $ per gallons.
Program Inputs
Enter your water usage in gallons:
The user will always enter a positive value, no error checking needed.
Program Outputs
Money owed: $XXXX
Replace XXXX with the actual money owed rounded to upto decimal places
Sample Output
Test Case :
Enter your water usage in gallons:
Money owed: $
Test Case :
Enter your water usage in gallons:
Money owed: $
Test Case :
Enter your water usage in gallons:
Money owed: $
Test Case :
Enter your water usage in gallons:
Money owed: $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
