Programming Assignment 1
Objectives:
• Practice reading input from the keyboard
• Practice displaying output to the screen
• Practice math
Assignment:
In this assignment, you are going to create the interface of a digital jukebox. The sales tax is 11%.
First, the customer will be asked to enter the name of a song and artist. Then, they will enter how
many times they want the song to be repeated. All info about their choice will be displayed. Next, it
will calculate the subtotal, tax, and total of the purchases. Finally, you will display these values as a
receipt.
Sample Executions:
Example 1:
1
Example 2:
Requirements:
• Use an updated comment block
• Your program should use the following comment block at the very beginning of your program.
# Name: Your name Date Assigned: Fill in
#
# Course: 2000-Sec # Date Due: Fill in
#
# File name: Fill in
#
# Program Description: Brief description of what the program does.
• Use appropriate comments throughout the program
• Make good use of whitespace
• Output must be neat, logical, and easy to understand.
2
Deliverables:
• Upload the file that has your source code to Moodle. The file should be from script mode,
NOT interactive mode.
Grading:
Total Points 10 points
Get song name correctly. 2 points
Get artist correctly. 2 points
Get number of plays correctly. 2 points
Calculate subtotal, tax, and total correctly. 2 points
Display choice information correctly 1 point
Display receipt correctly 1 point
Not enough comments/whitespace. -1 point
Output is difficult to read / understand or messy. -1 point
Doesn’t have good variable names. -1 point