Unit 1: Numbers, Expressions, and Conditional Execution

You are not logged in.

Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.

1) Readings

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

2) Exercises

How to Use these Exercises

The exercises are either automatically graded or manually graded by a human. Most are automatically graded, meaning you'll get immediate feedback on correctness. Manual grades (and comments, where applicable) will be visible shortly after the due date. Exercises have no limit on the number of submissions.

You should, where applicable, attempt to convince yourself fully that your answer is right, before submitting. Further, for problems that ask about how Python behaves (e.g. most of this week's drills), we highly encourage you to answer without running code in Python. 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. Remember--we're trying to build up our own mental model of Python's behavior!

For problems that ask you to write Python code, we recommend you first work through the problems by hand (without Python), then write Python, test your code thoroughly by running it on examples on your machine and drawing corresponding environment diagrams, and only then submitting. Aim to use as few submissions as possible, and to do as much of the problem yourself as you can before collaborating via the collaboration policy. Once you get to a solution, review our solution with the "View Answer" button (doing so will not affect your grade as long as you have already submitted your passing solution).

Always, if you are having trouble with a question, just ask!

2.1) Drills

  1. Basic Types
  2. Boolean Expressions
  3. Numeric Expressions
  4. Variables

2.2) Practice Exercises

  1. Distances
  2. Packaging
  3. Electricity Bill

2.3) Written Exercises

  1. Bug Hunt

2.4) (Optional but Encouraged) Survey

  1. Survey