m2kbeast m2kbeast
  • 23-11-2021
  • Engineering
contestada

Write a program to calculate the electricity bill amount as per the following criteria.

Respuesta :

wilfredtrabue
wilfredtrabue wilfredtrabue
  • 23-11-2021

Answer:

# Python Program to Calculate Electricity Bill units = int(input(" Please enter Number of Units you Consumed : ")) if(units < 50): amount = units * 2.60 surcharge = 25 elif(units <= 100): amount = 130 + ((units - 50) * 3.25) surcharge = 35 elif(units <= 200): amount = 130 + 162.50 + ((units - 100) * 5.26) surcharge = 45 else: amount = 130 + 162.50 + 526 + ((units - 200) * 8.45) surcharge = 75 total = amount + surcharge print("\nElectricity Bill = %.2f" %total)

Explanation:

Answer Link

Otras preguntas

In the play An Enemy of the People by Henrik Ibsen, What does Dr. Stockmann mean when he says "the strongest man is one who stands alone"?
grouping of irregular numbers of beats that add up to a larger overall pattern....
Promotion can be used to inform, persuade, and remind.true or false?
x + 6 2 − x − 8 7 = 2
Overall, about how many students prefer literature (poems, plays, or novels)? A. 45 B. 90 C. 100 D. 130 E. 180
¿Qué te gusta hacer donde vives?
Which describes accomplishments of the Persian Empire?
To which speech evaluation categories does the following question apply?SELECT ALL THAT APPLY Does the speech include supporting points backed by research and e
I’m confused on number 12!! SOMEBODY HELP DUE TMMR
How far do I have to go to the north or south to find a latitude where I can experience 24 continuous hours of darkness or (6 months later) 24 continuous hours