Home / Assignment 2.1

Assignment 2.1: Classes 2

You are not logged in.

If you are a current student, please Log In for full access to this page.

1) Readings

Please read this assignment's readings and work through the exercises contained therein.

2) Drills

Note: Effective Use of Drills

You should attempt these drills without running your code in Python, and only fall back to running your code if necessary. If you do have to fall back to using Python, it is crucial that you take the time to understand not only the result you got, but also why Python behaved the way it did.

Always, if you are having trouble with a question or can't figure out why Python is behaving the way it does, just ask!

  1. Transcript

3) Practice Exercises

Note: Effective Use of Practice Exercises

A good set of goals is:

  • work every problem as far as possible on your own (at least 10 minutes per problem).
  • do not run any Python code until you have simulated it on paper using environment diagrams and are confident that it will produce the right answer.
  • run and test your code on your own machine using Python before submitting (and, if it doesn't work, go back to the paper form to fix it before running it again).
  • try to use as few submissions as possible.
  • look at our solution once you have gotten the problem right, and compare it with your own.

This week, you do not need to do all of the practice exercises. Instead, you must complete at least one of the following exercises. As you are working, you may find it helpful to conduct the section of the notes on program design and style from last week's readings.

  1. Turmites
  2. Matrix