Does anyone know how to write a program in Python?

User Generated

Znexb

Programming

Description

COMPROG.pdf  FOLLOW INSTRUCTIONS ON ATTACHED FILE

A customer in a store is purchasing five items. Write a program that

asks for the price of each item, and then displays the subtotal of the sale, the amount of

sales tax, and the total. Assume the sales tax is 7 percent (use the value 0.07 to

represent 7 percent). 


Unformatted Attachment Preview

CSC 122 – INTRODUCTION TO PROGRAMMING PROG #1 100 POINTS Programming Exercise #1 Total Purchase Due: February 2, 2015 Instructions: A customer in a store is purchasing five items. Write a program that asks for the price of each item, and then displays the subtotal of the sale, the amount of sales tax, and the total. Assume the sales tax is 7 percent (use the value 0.07 to represent 7 percent). Programming Style Requirements 1. Open a new file to store your programming code (source code). This is done by clicking File on the menu bar, then clicking New File from the Python Shell window or simply pressing Ctrl+N. 2. Standard Output Program Header Information CSC 122-Section # - Program #1 By The standard output program header information is to be included at the top of the program and should be the first lines printed in the output screen. 3. Comments Include a main comment block (1-2 lines is sufficient) after the standard output program header information that describes the purpose of the program. When adding a comment statement to the program, start the comment statement with a # symbol in column 1 followed by the comment. 4. Saving the Program Save the program created in the text editor window as Prog1.py 5. Running the Program While in the text editor window, run (or execute) the program by pressing the F5 key. If the program has not been saved since the last modification was made, a dialog box will appear. Click OK to save the program. Winter 2015 1 Due: 2/2/2015 CSC 122 – INTRODUCTION TO PROGRAMMING PROG #1 Sample Output: Note: The blue text in the sample output above is the text generated by the program and the black text is the data entered by the user using their computer keyboard. When the program is working correctly, submit the Prog1.py file to Blackboard. (DO NOT send the program via email. Only homework submitted via Blackboard will be graded.) Grade Rubric: Points Task 10 The program is saved with the proper filename. 10 The program displays the standard program header information. 15 The program includes comments. 25 The program prompts the user to enter the price of the five items. 10 The program calculates and displays the correct subtotal Winter 2015 2 Due: 2/2/2015 CSC 122 – INTRODUCTION TO PROGRAMMING PROG #1 10 The program calculates and displays the correct sales tax (7%) 10 The program calculates and displays the correct total. 10 The program displays all of the amounts formatted to 2 decimal places. 100 Total Points Steps for Uploading the Program to Blackboard 1. Click on the Course Content tab. This will take you to the course assignment that has been posted. 2. Click on the Programming Assignments folder. Program #1 is located in this folder. 3. Click the >> Program #1 link to start the uploading process. 4. Go to the Assignment Materials area to attach the Prog1.py file. Click the Browse for Local File button to locate and attach your file. 5. Once you have attached the Prog1.py file, click the Submit button to submit your program. 6. Program #1 submission has been completed. Winter 2015 3 Due: 2/2/2015
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Related Tags