Spring2018.CITA180Homework1 History

Show minor edits - Show changes to output

Changed lines 1-2 from:
'''Assigned Date''': Wednesday, Jan. 17, 2017\\
'''Due Date''': Wednesday, Jan. 24\\
to:
'''Assigned Date''': Friday, Jan. 19, 2018\\
'''Due Date''': Friday, Jan. 26\\
Added lines 1-88:
'''Assigned Date''': Wednesday, Jan. 17, 2017\\
'''Due Date''': Wednesday, Jan. 24\\
'''Due Time''': 30 mins before class

Last modified on {$LastModified} (see [[http://www.cs.cofc.edu/~manaris/index.php/Spring2018.CITA180Homework1?action=diff&source=n&minor=n | updates]])

!!Assignment

Find a complete, interesting melody.

Write a Python program that plays it.

!!Submissions

Do '''all three''':

# Upload your program file on [[https://lms.cofc.edu/ | 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]

Also, see [[http://www.literateprogramming.com/ | literate programming]]:

->"Under the literate programming paradigm, the central activity of programming becomes that of conveying meaning to other intelligent beings rather than merely convincing the computer to behave in a particular way. It is the difference between performing and exposing a magic trick."

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.

(:source lang=Python tabwidth=3 -trim :)
# <name of your program>.py
#
# Author: <Your name>
# Email: <Your email address>
# Class: <Your class and section number>
# Assignment: Homework #1
# Due Date: <The assignment due date>
#
# Purpose: To play the melody of <name of piece> using Python.
#
# <Include URL of music score, etc. - anything that you referenced online to make this program.>
#
# Input: None.
#
# Output: The melody played by the computer.
#
(:sourcend:)

!!Bonus

For extra points, once you complete the main assignment, you may submit a separate, additional program.

* Any other idea you can think of is fine.
* For full credit, use comments in the program to document your idea.
* Give the program a meaningful name.

!!Grading

Your grade will be based on how well you followed the above instructions, and the depth/quality of your work.

!!Learning Objectives

This assignment has the following objectives:

* Understand the fundamentals of music theory.
* Analyze music and create musical studies modeled on pre-existing works.
* Apply numeric data types to represent information.
* Use variables in program development.
* Use predefined classes in program development (object-based programming).

Also how to:

* Create an interesting melody with JythonMusic

!!Reference

# Cooper, D. and Clancy, M. (1985) "Oh! Pascal", 2nd ed., W.W. Norton & Company, New York, p. 42.