Python program to calculate electricity bill

python program examples it computer guruji

Write a program in python to calculate electricity bill behalf of given criteria

----------------------------------------------

tuc=int(input("Enter the number of units consumed : "))
if tuc>500:
    amount=tuc*9.25
    surcharge=80
elif tuc>300:
    amount=tuc*7.75
    surcharge=70
elif tuc>200:
    amount=tuc*5.25
    surcharge=50
elif tuc>100:
    amount=tuc*3.75
    surcharge=30
else:
    amount=tuc*2.25
    surcharge=20
billtotal=amount+surcharge
print("Electricity Bill : ",billtotal)

----------------------------------------------

Output-

Enter the number of units consumed : 430
Electricity Bill :  3402.5

Post a Comment

0 Comments