Ibra Electricity Company has an automated system that calculates the total bill for each area in a given city. The system gets to know the number of areas from the electricity manager. For each area it asks the number of families in the area. For each family it asks the number of units used and then calculates the total price for the family with the price per unit being 0.4 OMR. It also calculates the sum of the units used for each family in an area and displays that. First, read the number of areas. Then, for each area, read the number of families. For each family read the number of units used and calculate the total price. Along with this calculate the total number of units used in an area by finding the sum of each family’s usage. Finally display the total number of units for each area. using python programing (nested loop)

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section4.2: The If-else Statement
Problem 8E
icon
Related questions
Question

Ibra Electricity Company has an automated system that calculates the total bill for each area in a given city. The system gets to know the number of areas from the electricity manager. For each area it asks the number of families in the area. For each family it asks the number of units used and then calculates the total price for the family with the price per unit being 0.4 OMR. It also calculates the sum of the units used for each family in an area and displays that. First, read the number of areas. Then, for each area, read the number of families. For each family read the number of units used and calculate the total price. Along with this calculate the total number of units used in an area by finding the sum of each family’s usage. Finally display the total number of units for each area.

using python programing (nested loop)

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Probability Problems
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning