Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question # 2 TQ Marks-20) Write a FUNCTION that calculates how much bill user has to pay according to the usage of Electricity units. User
Question # 2 TQ Marks-20) Write a FUNCTION that calculates how much bill user has to pay according to the usage of Electricity units. User will provide just number of units he consumed in main function. Constraints: 1. Rate of the first 100 units is Rs15/unit, for 100-300 units - its Rs25/Unit and for more than that, its Rs27/Unit. 2. You have to add Nelum-Jehlum surcharge as 15% of total bill. 3. Now add TV charges RS50 in every bill. 4. If the bill exceeds RS500, give them discount of 3% on total. Check for these values: 1. Enter number of units: 1 a. Your total bill is RS: 67.25 2. Enter number of units: 10 a. Your total bill is RS: 222.5 3. Enter number of units: 120 a. Your total bill is RS: 2350 4. Enter number of units: 321 a. Your total bill is RS: 7931.74 5. Enter number of units: 500 a. Your total bill is RS: 13325
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started