Solved by Expert Tutors
I am stuck on this Python programming script.
Solved by Expert Tutors

I am stuck on this Python programming script. Can someone help me figure this out Thanks

Problem 2

A town uses a two-tier system to calculate bill for water usage.  For the first 8000 gallons, it is $0.004 per gallon.  After the first 8000 gallons, the rate will be $0.007 per gallon. Suppose a customer uses 8500 gallons of water.  He will pay $0.004 per gallon for the first 8000 gallons, and $0.007 per gallon for the last 500 gallons. Write a Python program to determine how much a customer needs to pay.  Ask the user how much water he has used.  Calculate and display the water bill. The following are two examples.

Enter gallons of water used: 2100

Please pay this amount: $8.4

Enter gallons of water used: 8500

Please pay this amount: $35.5

Step-by-step answer

The student who asked this found it Helpful

tesque dapibus ef

gue vel laoreetinia pulvinar tortor nec facilis,


unec faciliituru

Donec aliquet. Lorem ipsum diturlestitrictuiturste


ac, dictum vitae odio. Donec alte

rem its ante, dapibus a molestie co, dictum

Subscribe to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Let our 24/7 Computer Science tutors help you get unstuck! Ask your first question.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes