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

  Die young with extraordinary accomplishments

Would you prefer to live a long life with smaller accomplishments or to die young with extraordinary accomplishments? Explain your choice.

  Naeyc''s indicators of effective curriculum

Explain how the role of the administrator is different from that of the teacher in program and curriculum planning.

  Fighting to maintain democracy-capitalism-military strength

Was the United States fighting to maintain democracy, capitalism, military strength, and/or control of space What about the Soviet Union? Which goals were most important to each side To what lengths were they willing to go to achieve their goals

  Explain how you made the decision to pursue an education in

develop a four-page analysis on the projected return on investment for your college education and projected future

  Performance of a candidate during a presidential debate

A focus group of 10 adults was chosen to evaluate the performance of a candidate during a presidential debate. Each member of the group rated the overall performance on a scale of 1 (poor) to 10 (superior). The ratings given to the candidate were as ..

  The internet provides an unprecedented amount of

the internet provides an unprecedented amount of information by way of blogs videos and podcasts. conduct a critique of

  What clinical manifestations are present in ms g and what

ms. g. a 23-year-old diabetic is admitted to the hospital with a cellulitis of her left lower leg. she has been

  Researchers demonstrated the symbolic

Which animal have researchers demonstrated the symbolic meaning of certain forms of communication used naturally in the wild

  Perspectives on culture

Many of our military have been asked to go to different cultures around the world. Write a 500 word essay discussing your experience with different cultures. Some things to consider: what types of customs and norms did they have that you had to ac..

  Clarify the insurgents captured more territory

What is the status of the communist insurgency in Nepal? Have the insurgents captured more territory? Lost territory.

  Major theoretical perspectives in sociology

Compare the differences among the three major theoretical perspectives in sociology (structural-functionalism, conflict theory, and symbolic interactionism).

  Implement a process change within your finance department

You are the CEO of a 200-bed acute care facility and are challenged with the mandates of the Patient Protection and Affordable Care Act

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