Determines annual cost of electricity

Assignment Help Other Subject
Reference no: EM13784214

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.

Reference no: EM13784214

Questions Cloud

Violent or sexually explicit or neutral tv shows : The Iroquois Indians lived in peace for hundreds of years as a hunting nation, but in the seventeenth century, trade introduced by Europeans brought the Iroquois into competition with a neighboring tribe. A series of tribal wars developed, and the..
Loans available from banks for new ventures : How do you obtain your start-up capital? Identify at least three sources of your start-up capital. There are four types of loans available from banks for new ventures.
Draw a custom two-dimensional graphics : Draw a custom two-dimensional graphics (artwork) of your own choices by combining at least four Shape classes and neatly organizing them in any layout container. Paint and transform your graphics by using any gradient Brush with more than two colo..
Conflict in relationships with people at work : Consider how you deal with conflict in relationships with people at work. Is it similar to how you handle conflict in non-work relationships? Discuss your conflict style and how this style has affected your relationships.
Determines annual cost of electricity : 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-­..
Write a rhetorical analysis comparing two advertisements : Write a rhetorical analysis comparing and contrasting two advertisements. These ads should be linked somehow: they could advertise similar productions, use similar approaches, be aimed at the same audience, etc.
What is the effect of the arbitration board decision : What is the basis of the employees' claim that the union had breached its duty of fair representation? What is the effect of the arbitration board decision in this case
Discuss vygotsky belief : Discuss Vygotsky's belief that language is the most significant of the cultural tools. Do you agree or disagree?
Sales and cash budget issues : Give a detailed example of how the process of a sales budget and a cash budget would work for your venture.

Reviews

Write a Review

Other Subject Questions & Answers

  In most of the cities allthrough the united states the

in many cities throughout the united states the prevalence of hate crimes has increased. you have been asked to provide

  We often hear about the glass ceiling-does it exist

We often hear about the "glass ceiling." Does it exist? Are there invisible barriers to advancement that impact some groups more than others? Use examples from the course reading to support your points, and feel free to share your own experiences wit..

  Discuss the changes in the egyptian religion

Discuss the changes in the Egyptian religion that led to the Amarna style of art. Discuss the chief characteristics of the Amarna style of art, focusing on its contrasts with the characteristics of previous ancient Egyptian art. Name one work of art ..

  Explaining the sexual harassment and retaliation

Jane Smith complained to the human resources department that a female co-worker was touching her and making sexually inappropriate comments.

  Psychology and sociology of teen eating habits

In the past decade, teens in America have disregarded their healthy state due to lack of eating habits and exercise. However, it is not just the teens' fault. Because of stress, depression, social pressure, and their grandparent's eating habits, it c..

  What is the relationship between integrity and leadership

write a 1000-word response tonbspactivity 5. in doing so consider the saint leo university core value of integrity

  Some students work hard in school to attain high grades

You smell coffee brewing in the morning and, really, it is the only reason you are willing to get out of bed. In this situation, the coffee is a(n): Serena is only one hour old. Remarkably, when she feels anything touch her cheek, she starts rooting ..

  Decision analysis compared to baynes theorem

What are the advantages and disadvantages of decision analysis compared to baynes theorem?

  Create a paper of no more than 700 words in which the goal

sampling designusing the scenario and two variables your learning team developed for the week 2 business research

  Usually fine just working on my own

As a new supervisor you are looking in on your workers, this time it is Terri, and she isn’t doing too well. Exasperated, she turns to you and says, “I’m sorry, I’m sorry, this is just, I mean why are staring at me? This isn’t how I usually, but, wit..

  Cost control stategies of employer sponsored health plans

Compare cost control stategies of employer sponsored health plans, in which employers buy from insurance companies to self-funded health plans, in which employers cover costs of benefits. Include the following factors: Riders, enrollment periods, pro..

  Plagiarizing and online education

Define and explain the dual problems of grade inflation and academic integrity in online education; prepare in-text and reference methods for at least three sources.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd