Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started