Question: Write a program to read data stored in water.txt, which was created in Problem 1. Calculate water charge for each customer. Residential customers pay $0.005

Write a program to read data stored in water.txt, which was created in Problem 1. Calculate water charge for each customer. Residential customers pay $0.005 per gallon for the first 6000 gallons. If the usage is more than 6000 gallons, the rate will be $0.007 per gallon after the first 6000 gallons. Business customers pay $0.006 per gallon for the first 8000 gallons. If the usage is more than 8000 gallons, the rate will be $0.008 per gallon after the first 8000 gallons. Display account number and water charge of each customer on computer screen.

The following is an example.

Account number: 3147 Water charge: $5.0

Account number: 2168 Water charge: $30.02

Account number: 5984 Water charge: $12.00

Account number: 7086 Water charge: $48.02

Please post code i can use with pycharm for python prgramming

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!