Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Homework Help/Study Tips Expert

I wrote this algorithm that is given your electric meter readings (in kilowatt-­-hours) at the beginning and end of each month of the year. The algorithm determines your annual cost of electricity on the basis of a charge of 6 cents per kilowatt-­-hour for the ?rst 1,000 kilowatt-­-hours of each month and 8 cents per kilowatt-­-hour beyond 1,000. After printing out your total annual charge, the algorithm also determines whether you used less than 500 kilowatt-­-hours for the entire year and, if so, prints out a message thanking you for conserving electricity.

Step 1: Set the value of i to1

Step 2: Set to the value of AnnualCharge to 0

Step 3: While i is greater than or equal to 12 do

Step 4: Get the value of KWBegini and KWEndi

Step 5: Set the value of MonthlyUsagei to KWEndi - KWBegini

Step 6: If MonthlyUsagei < 1000 then

Step 7: Set AnnualCharge to AnnualCharge +(.06MonthlyUsagei )

Step 8: Else

Step 9: Set AnnualCharge to AnnualCharge + (.06)1000 + (.08)( MonthlyUsagei - 1000)

Step 10: Set the value of i to i +1

End of While loop

Step 11: Print the value of AnnualCharge

Step 12: If (KWEnd 12 - KWBegin1) < 500, then

Step 13: Print the message "Thank you for conserving electricity."

Ask the user for the next KWBegini and KWEndi each time through your loop and store them in two lists: one for all the KWBegin values and one for all the KWEnd values. You don't need to keep track of the MonthlyUsage for each month.

Homework Help/Study Tips, Others

  • Category:- Homework Help/Study Tips
  • Reference No.:- M91354357
  • Price:- $40

Guranteed 36 Hours Delivery, In Price:- $40

Have any Question?


Related Questions in Homework Help/Study Tips

Discussion theoretical frameworks program models and

Discussion : Theoretical Frameworks, Program Models, and Strategies Throughout your program, you have reviewed scholarly literature, theoretical frameworks, and different program models and strategies to address issues o ...

Question instructions 1 read the article take your kids to

Question: Instructions: 1). Read the article "Take your Kids to Disneyland and Give them Memories for a Lifetime - for Free!". - Take Your Kids to Disneyland for Free.docx (16.786 KB) 2). Watch the Tom Lyon video, "Inter ...

What are the three ways in which heredity and environment

What are the three ways in which heredity and environment may be correlated, using examples from development?

Question in this assignment you will be completing a health

Question: In this assignment, you will be completing a health assessment on an older adult. To complete this assignment, do the following: 1. Perform a health history on an older adult. Students who do not work in an acu ...

Question 1 in the cdc statistics article which statistics

Question: 1) In the CDC Statistics article, which statistics were interesting to you or surprised you and why? (If none surprised you - explain why) 2) After reading the article (see text above), "When are you ready for ...

Question this online discussion is about the life of

Question: This online discussion is about the life of William Shakespeare, considered the greatest playwright in theatre history. Before the internet age, if one wanted to study Shakespeare, one would have to research sc ...

Question imagine that you have decided to open a small ice

Question: Imagine that you have decided to open a small ice cream stand on campus called "Ice-Campusades." You are very excited because you love ice cream (delicious!) and this is a fun way for you to apply your business ...

Question essay format and apathis week we are discussing

Question: Essay format and APA This week, we are discussing chapters 1, 2 and 3. A couple of things to note: Chapter 1 Introduction to Accounting and Business Accounting is crucial in our information age. In this chapter ...

Question given the various predisposing factors that make

Question: Given the various predisposing factors that make humans susceptible to opportunistic infections, how can healthcare providers curtail the rising incidence of such infections? (8 sentences) The response must be ...

Assignment 1 application of crisis theory and resiliency

Assignment 1: Application of Crisis Theory and Resiliency Theory to a Case Study It is common for social workers to be presented with a crisis situation brought forth by clients, families, communities, and/or organizatio ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As