Answered step by step
Verified Expert Solution
Link Copied!

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:
\table[[Tier,Charge],[Gallons 0-5999,$2.35 per 1000 gallons],[Gallons 6,000-20,000,$3.75 per 1000 gallons],[Gallons over 20,000,$6.00 per 1000 gallons]]
No mater the total water usage, the first 5,999 gallons cost $2.35 per 1000 gallons. Any gallons from 6,000 to 20,000 then cost $3.75 per 1000 gallons. Finally, any water usage left will cost $6.00 per 1000 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: $XX.XX
Replace XX.XX with the actual money owed rounded to upto 2 decimal places
Sample Output
Test Case 1:
Enter your water usage in gallons: 1000
Money owed: $2.35
Test Case 2:
Enter your water usage in gallons: 10000
Money owed: $29.1
Test Case 3:
Enter your water usage in gallons: 40000
Money owed: $186.6
Test Case 4:
Enter your water usage in gallons: 6001
Money owed: $14.11
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions

Question

2. What type of team would you recommend?

Answered: 1 week ago

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago