Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

InClass 3 _ 1 2 . py #Prompt the user to enter water consumption ( meter reading ) in gallons #Compute and display the water

InClass3_12.py
#Prompt the user to enter water consumption (meter reading) in gallons
#Compute and display the water bill based on this rule:
# The first 100 gallons cost $.10 per gallon.
# The next 100 gallons cost $.20 per gallon (Example: For 150 gallon water consumption, the first 100 gallons cost $.10($10)+ the next 50 gallons cost $.20( $10) for a total of $20+ surcharge)
# Any consumption above 300 gallons cost $.80 per gallon.
# An additional surcharge of 108 is added to the bill
#Use placeholder & format to round the total charge to 2 decimal places
#0utput format: Total charge: $..
#Examples:
#Enter water consumption: 90
#Total charge: $9.90
#Examples:
#Enter water consumption: 120
#Total charge: $15.40
#Examples:
#Enter water consumption: 270
#Total charge: $63.80
#Examples:
#Enter water consumption: 500
#Total charge: $253.00
NEED IN PYTHON CODE PLEASE AND THANK U!
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

Formal SQL Tuning For Oracle Databases Practical Efficiency Efficient Practice

Authors: Leonid Nossov ,Hanno Ernst ,Victor Chupis

1st Edition

3662570564, 978-3662570562

Students also viewed these Databases questions