How To Calculate Electricity Bill Amount
#CALCULATE ELECTRICITY BILL AMOUNT
print('ELECTRICITY BILL AMOUNT')
print('\nUnits Consumed -------- Rate')
print(' 0-100 5.0')
print(' 101-200 6.5')
print(' 201-300 7.5')
print(' >300 8.0')
u=int(input('\nEnter Number Of Electricity Units Consumed :- '))
amt=0
if(0<u<=100):
amt=u*5.0
elif(100<u<=200):
amt=500+(u-100)*6.5
elif(200<u<=300):
amt=1150+(u-200)*7.5
elif(u>300):
amt=1900+(u-300)*8.0
else:
print('\nERROR in the INPUT')
print('Your Amount For',u,'units is',amt)
Made By :-
Nilay Saraf
Comments
Post a Comment