17.7k views
0 votes
(100 MORE POINTS!!!) Using Python, solve this fourth problem.

(100 MORE POINTS!!!) Using Python, solve this fourth problem.-example-1
User XGHeaven
by
8.4k points

1 Answer

4 votes

Answer:

def waterBill(gallons: int):

if gallons < 8001:

return 5*(gallons/1000)

elif gallons > 8000 and gallons < 22001:

return 6*(gallons/1000)

elif gallons > 22000 and gallons < 30001:

return 7*(gallons/1000)

else:

return 10*(gallons/1000)

print(waterBill(5000))

print(waterBill(28000))

print(waterBill(40000))

User Arjun Shahi
by
8.2k points