CITA/CSCI 180 – Spring 2019 – Homework 2

Assigned Date: Monday, Jan. 28, 2018
Due Date: Wednesday, Feb. 6
Due Time: 30 mins before class

 

Assignment

Find a complete, interesting melody.

Write a Python program that plays it.

Submissions

Do all three:

  1. Upload your program file on OAKS.
  2. Hand in a printout of your Python program in class on the due date.
  3. 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

  1. Cooper, D. and Clancy, M. (1985) “Oh! Pascal”, 2nd ed., W.W. Norton & Company, New York, p. 42.
Skip to toolbar