Computer Science, asked by jbaluva, 2 months ago

5. Write a python program to input electricity unit charges and calculate total electricity bill according to the given condition:
For first 50 units Rs. 0.50/unit
For next 100 units Rs. 0.75/unit
For next 100 units Rs. 1.20/unit
For unit above 250 Rs. 1.50/unit
An additional surcharge of 20% is added to the bill

Answers

Answered by nehamadke49
2

Answer:

Python program to calculate electricity bill

Declare total unit consumed by the customer using the variable unit.

If the unit consumed less or equal to 100 units, calculates the total amount of consumed =units*1.5.

If the unit consumed between 100 to 200 units, calculates the total amount of consumed=(100*1.5)+(unit-100)*2.5)

Answered by shsrishi
17

Answer:

u = int(input('Enter The Amount Of Units Consumed:'))

if u <= 50:

amt = u*0.5

print('Amount To Be Paid Is:',amt)

elif u <= 150 and u > 50:

amt = (50*0.5) + ((u-50)*0.75)

print('Amount To Be Paid Is:',amt)

elif u <= 250 and u > 150:

amt = (50*0.5) + (100*0.75) + ((u-150)*1.2)

print('Amount To Be Paid Is:',amt)

else:

amt = (50*0.5) + (100*0.75) + (100*1.2) + ((u-250)*1.5)

print('Amount To Be Paid Is:',amt)

print('Process Completed')

Similar questions