Calculate Electricity Bill using Python
Calculate Electricity Bill
- if unit consumed <= 200 then cost per unit is RS 10
- if unit consumed >= 201 and <= 400 then cost per unit is RS 15
- if unit consumed >= 401 and <= 500 then cost per unit is RS 18
- if unit consumed >= 501 then cost per unit is RS 20
Program Source Code:
unit = int(input("Enter Unit:"))
if unit <= 200:
bill = unit * 10
elif unit>=201 and unit <= 400:
bill = unit * 15
elif unit>=401 and unit<=500:
bill = unit * 18
else:
bill = unit * 20
print("Bill Per Unit:",bill)
bill = bill + 350
print("Bill Per Unit after add Line Rent:",bill)
if bill>3000:
bill = bill + (bill*0.1)
print("Your Total Bill :",bill)
Post a Comment