Assigned Date: Wednesday, Sep. 11, 2024
Due Date: Wednesday, Sep. 18
Due Time: 30 mins before class
Contents
Assignment
Find a complete, interesting melody. Claim it on the Ed Discussion board – make sure no one else is doing it – if so, pick another melody.
Write a Python program that plays it.
Be ready to perform it in class.
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. Look at the book examples here.
You should comment all variables, obscure statements, and blocks of code.
Give your program a meaningful name, e.g., stairwayToHeavenMelody.py.
Header Documentation
VERY IMPORTANT: Copy and paste the following to 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 #1 # Due Date: The due date # # Purpose: Describe what the program does. # # Include any special notes, such as URLs of background information or sources (very important). #
Grading
Your grade will be based on how well you followed the above instructions, and the depth/quality of your work.
Submissions
1. Bring to class the following:
- A printout of your Python program.
- A printout of the music score of the melody (if available) – for extra credit.
- Be ready to perform your program in class – part of your grade depends on this.
2. Also, submit your Python (.py) file on OAKS, so I can run it on my computer. Do NOT submit over email.
Reference
- Cooper, D. and Clancy, M. (1985) “Oh! Pascal”, 2nd ed., W.W. Norton & Company, New York, p. 42.