Question: The Lexington Electric Company needs a program to input customer usage and calculate their bills. It should also calculate the total of the bills and
The Lexington Electric Company needs a program to input customer usage and calculate their bills. It should also calculate the total of the bills and the average bill. The number of customers processed within a batch is an integer. There are two types of service provided, (G) General Three Phase and (R) Residential. You do not have to handle lowercase inputs, just G or R. If an invalid type of service is entered, it is considered to be General Three Phase. Display a message about the invalid type and continue. The rate for General Three Phase Service is $0.18483 per kWh; the rate for Residential service is $0.11704 per kWh The number of kWh used can be a float A customer's bill is calculated by multiplying the kWh used times the rate per kWh. Customers consume kWh and pay for kWh, but the Lexington Electric Company processes batches in MWh ( 1 MWh = 1,000 kWh ) The Total of bills, Total MWh used, Revenue/MWh and Revenue/customer are displayed after all customers in the batch have been processed. Output of all results should be formatted to: Two decimal places for dollar amounts Five places for rate ( 0.11704 for Residential, 0.18483 for General Three Phase ) If there are zero customers, the Revenue/customer should be reported as zero. Do not divide by zero! If there is zero kWh used, the Revenue/MWh should be reported as zero. Do not divide by zero! in python please
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
