An electricity company charges their consumers according to the units consumed per month according to the given traffic: Unit Consumed Charge per unit 200 baisa Up to 100 units More than 100 units and up to 200 units 250 baisa More than 200 units and up to 400 units 300 baisa Morethan 400 units 400 baisa In addition to the above, every consumer has to pay 200 baisa as Service charge per month. Write a Python program named electricity.py that read the units consumed as an input and calculate the total charges payable by the customer. The following is the formula to calculate total charge. Total charge units consumed Charge per Unit + service charge

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 13PE
icon
Related questions
Question
Nasra
An electricity company charges their consumers according to the units consumed per month according to
the given traffic:
Unit Consumed
Charge
per unit
200 baisa
Up to 100 units
More than 100 units and up to 200 units
250 baisa
More than 200 units and up to 400 units
300 baisa
Morethan 400 units
400 baisa
In addition to the above, every consumer has to pay 200 baisa as Service charge per month.
Write a Python program named electricity.py that read the units consumed as an input and calculate the
total charges payable by the customer. The following is the formula to calculate total charge.
Total charge = units consumed * Charge per Unit + service charge
Run and test your program. Once done, submit the file named electricity.py at the link below.
Transcribed Image Text:Nasra An electricity company charges their consumers according to the units consumed per month according to the given traffic: Unit Consumed Charge per unit 200 baisa Up to 100 units More than 100 units and up to 200 units 250 baisa More than 200 units and up to 400 units 300 baisa Morethan 400 units 400 baisa In addition to the above, every consumer has to pay 200 baisa as Service charge per month. Write a Python program named electricity.py that read the units consumed as an input and calculate the total charges payable by the customer. The following is the formula to calculate total charge. Total charge = units consumed * Charge per Unit + service charge Run and test your program. Once done, submit the file named electricity.py at the link below.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT