Problem Sets for Computational Lab in Physics (Physics 102, Fall 2012)

Weekly homework consists of programming labs. Problems will be assigned each week or every other week.

The assignments will appear on the course website (below) by then.

They are due at the beginning of the Tuesday lecture on the date noted.

Electronic solutions should be emailed to reach the TA by the time they are due.

Format the emails as follows.

The subject line should be:

Subject: <Your capitalized last name>HW#

For example, when Alice B. Toklas submits the next homework (say, Homework B), the correct email subject line would be “ToklasHWB”.

Within the message, each program file attached must be labeled using the subject line followed by an underbar and the exercise's suggested program name. For example, Alice's Triangle.py program from Homework A would be an attached file labeled “ToklasHWA_Triangle.py”.

Finally, the first line of the Python program itself should similarly identify you and the program name: “# Alice Toklas HWA Triangle.py”.

The solutions should consist of commented, working Python code.

You must subject all of the components you wrote that are required to provide a running program which solves each exercise.

Each code block should be documented with comments that describe what the code block does and how it achieves this. It is expected that comments will be more lines than the code itself. Also, code must use descriptive names for important variables, objects, classes, functions, and the like.

Note that the first homework or two don't ask for complete programs. Rather they are more about learning by directly interacting with the computing system and with Python. You can simply capture a correct interaction session and email in the text file(s).

Assignments: