Assigned Date: Monday, Feb. 3, 2020
Due Date: Monday, Feb. 10
Due Time: 30 mins before class
Assignment
Find a complete, interesting melody.
Write a Python program that plays it.
Submissions
Do all three:
- Upload your program file on OAKS.
- Hand in a printout of your Python program in class on the due date.
- Be ready to perform it in class.
Your program should have a meaningful name, e.g., stairwayToHeaven.py.
Program Documentation
The Golden Rule of Style: “A program should be as easy for a human being to read and understand as it is for a computer to execute.” [1]
Your code should have general comments at the top, which explain what the program does.
You should comment all variables, obscure statements, and blocks of code.
Follow the textbook examples on how to write comments.
Copy and paste the following into the top of your program. Update it, to fit what your program does.
# nameOfYourProgram-MakeSureYouUpdateThis.py # # Author: Your full name # Email: Your school email # Class: The class you are in # Assignment: Homework #2 # Due Date: The due date # # Purpose: Describe what the program does. # # Input: Describe the input to the program. # # Output: Describe the output of the program. #
Grading
Your grade will be based on how well you followed the above instructions, and the depth/quality of your work.
Reference
- Cooper, D. and Clancy, M. (1985) “Oh! Pascal”, 2nd ed., W.W. Norton & Company, New York, p. 42.