Question: Write a program that will calculate and print bills for the city power company. The rate depending on whether the use is residential or commercial.
Write a program that will calculate and print bills for the city power company. The rate depending on whether the use is residential or commercial. A code of R means residential use and a code of C means commercial use. Any other code should be treated as an error and the program repeats until a valid code is entered.
The rates are computed as follows:
R: RM6.00 plus RM0.052 per kwh used
C: RM60.00 for the first 1000 kwh and RM0.045 for each additional kwh
Your program should prompt the user to enter an integer account number, the use code and the necessary consumption figures in whole numbers of kilowatt-hours. Your program should display the amount due from the user.
in phyton pls
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
