Calculates the annual cost of running various appliances

Assignment Help Python Programming
Reference no: EM132357174

Question

Objective To write a program that calculates kilowatt - hour electrical appliance usage.

PROJECT DESCRIPTION

Write a program that calculates the annual cost of running various appliances. For each appliance, the program will request that the user enter the cost per kilowatt - hour and the number of kilowatt - hours the appliance uses in a year.

Sample run of the program is shown below showing input gathered and a resulting output total displayed.

Please enter the appliance name: central air

Please enter the cost per KW - hr of the appliance (in cents): .17

Please enter the annual usage (in KW - hr): 1400

Please enter the appliance name: dishwasher

Please enter the cost per KW - hr of the appliance (in cents): .17

Please enter the annual usage (in KW - hr): 25

Please enter the appliance name: electric range

Please enter the cost per KW - hr of the appliance (in cents): .16

Please enter the annual usage (in KW - hr): 52

Please enter the appliance name: refrigerator

Please enter the cost per KW - hr of the appliance (in cents): .15

Please enter the annual usage (in KW - hr): 175

Please enter the appliance name: toaster

Please enter the cost per KW - hr of the appliance (in cents): .15

Please enter the annual usage (in KW - hr): 4

Please enter the appliance name: washing machine

Please enter the cost per KW - hr of the appliance (in cents): .16

Please enter the annual usage (in KW - hr): 9

The total cost of the annual usage is $ 278.86.

Information about This Project

When you purchase electricity you are charged by the kilowatt - hour ( kWh ) . For example, when you use 1,000 watts for 1 hour, that is one kilowatt - hour.

Steps To Complete This Project

STEP 1 Open the Python IDLE IDE and Write the Program Code

Open the Python IDLE IDE ( Integrated Development Environment ) on your computer.

You'll notice when you initially open python the default is an interpretive shell allowing only for single commands to be given. You really need to enter in a whole program then execute it to work any of the labs for the course. To start entering code into IDLE go to File > New File from your menu. This will allow you to enter your source code in an editor style format like notepad.

At any point your can save your file. It will prompt you to do so when you go to run your program. You may save your file anytime to a designation of your choice. The extension will always be .py.

In the editor you may begin typing your source code. Here are some thoughts to assist you in writing the program code.

For all your labs include comments where applicable in your code that explains a

bit what your assigning as variables as an example or what a loop will perform or a method, etc. To enter in a comment anywhere in code include a hash tag

( # ).

Example:

#local variable declarations

totalCost = 0.0 # declare variable a float type/use is to accumulate total charges

Have your program perform the following logic:

Write the program code that will allow the user to enter the necessary input items listed in the project description area above (check the sample run provided) and then use these items to compute the required output value, that is, the annual usage charge. The annual usage charge is based on cost * kWh usage as mentioned above per a given appliance. Accumulate a sum total of all annual usage charges and display your result at the end of the program.

Reference no: EM132357174

Questions Cloud

Snmp is only one of several management protocols : SNMP is only one of several management protocols. What other management protocols exist? Who created them? What types of situations do they manage?
What are the current certifications that companies : What are the current certifications that companies are looking for with respect to network administrators
Information systems are key components to any organization : The key elements of any Information System is hardware, software, people and processes. Of these which is more important and why?
Describe what you will do for each step : Describe what you will do for each step in up to implementation. You will need to relate the steps to the DRMS. For example, who are the users of DRMS
Calculates the annual cost of running various appliances : Write the program code that will allow the user to enter the necessary input items listed in the project description area. calculates the annual cost of running
Decision making using visualizations in complex systems : Your readings in this unit, along with the two sources that you locate on decision making using visualizations in complex systems
What is the warranty of merchantability : What is the warranty of merchantability? What is the warranty of fitness for a particular purpose? What are the different ways in which personal property can be
Prepare for the dissertation process : This assignment will be one of several throughout the Ph.D. program that we use to help you prepare for the dissertation process.
Analyze the remedies available to a plaintiff : Based on the above information and your readings, analyze the remedies available to a plaintiff in a breach of contract suit under the common law of your state.

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

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