Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write the code in python program Write a program that will calculate and print bills for the city power company. The rate depending on

image text in transcribed

Please write the code in python program

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. Input validation: Do not accept negative number for consumption figure. The program will ask the user to re-enter new input

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions

Question

Perform an Internet search. Discuss a company that uses EPLI.

Answered: 1 week ago

Question

Know how productivity improvements impact quality and value.

Answered: 1 week ago

Question

Recommend the key methods to improve service productivity.

Answered: 1 week ago