Physics
Physics, 17.03.2020 01:20, kristenhernandez74

In Lab 07 we wrote a program to calculate energy bill for residential and business customers. We are going to rewrite that program with value returning functions. Residential customers pay $0.12 per kWh for the first 500 kWh. After the first 500 kWh, the rate is $0.15 per kWh. Business customers pay $0.16 per kWh for the first 800 kWh. After the first 800 kWh, the rate is $0.20 per kWh. Write a program to calculate energy charge. You must write and use the following functions. (a) A main function: Call the value returning function get_user_input, which returns kWh used and customer type. Pass the return values to the value returning function bill_calculator as two arguments. Display the return value of bill_calculator. (b) A get_user_input function: This function has no parameter. It asks the user to enter number of kWh used. Use an input validation loop to ensure that kWh used is not negative. Also ask the user to enter customer type (enter R for residential or B for business). Convert lowercase letter to uppercase. Use an input validation loop to ensure that customer is either R or B. Return kWh used and customer type. (c) A bill_calculator function: This function has two parameters to receive number of kWh used and customer type. Calculate and return the energy charge

answer
Answers: 2

Other questions on the subject: Physics

image
Physics, 22.06.2019 05:30, dontcareanyonemo
What are similarities and differences of reflection, refraction, diffraction and absorption?
Answers: 1
image
Physics, 22.06.2019 08:40, tasniahussain21
The system is released from rest with the cable taut, and the homogeneous cylinder does not slip on the rough incline. determine the angular acceleration of the cylinder and the minimum coeffi cient s of friction for which the cylinder will not slip.
Answers: 2
image
Physics, 22.06.2019 10:00, mathscience9301
Which fact supports the conclusion that there will be fewer farm managers in the future? a) a farmer manager’s duties vary by the type of farm. b) farm technology is replacing some administrative jobs c) farm managers often need experience but not education. d) administrative duties include budgeting and training staff.
Answers: 2
image
Physics, 22.06.2019 10:00, jeffffffff
**urgent** roberto plans to use two transformers to reduce a voltage of 120 v to 4 v. he uses a transformer that has 300 coils in the primary winding and 50 coils in the secondary winding. he has four other transformers, as listed in the table. which transformer should roberto use to have an ending voltage of 4 v? a- w b-xc- yd- z
Answers: 1
Do you know the correct answer?
In Lab 07 we wrote a program to calculate energy bill for residential and business customers. We are...

Questions in other subjects: