Sunday, July 14, 2019

An electricity board charges according to the following rates:

For the first 100 units -   40 paisa per unit.
For the next 200 units -   50 paisa per unit.
beyond 300 units -  60 paisa per unit.
All users are charged meter charges also, which are Rs. 50/-

unit = float(input("Enter  Unit = "))
rs = 0.00
if (unit<100):
rs = (unit * 0.40)
elif(unit <= 300 and unit > 100):
rs = 40+((unit-100)*0.50);
elif(unit>300):
rs=140+((unit-300)*0.60);
rs = rs + 50
print("total bill = " + str(rs))

No comments:

Post a Comment