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.
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.
|