For the second class, read sections 4.1, 4.2, 4.4 - 4.7, and 4.12 of Chapter 4.
For the third class, read all of Chapter 3.
For Day 6, catch up on any reading you've missed and read Chapter 10.1-10.3 and 10.7.
For Day 7, read all of Chapter 12.
For Day 9, read all of Chapter 16.
No readings today!
No readings today!
For Day 12, read the "List Comprehensions" section of Chapter 2 of the 6.01 Course Notes.
Exercises/Labs and Solutions
Homework 1: Checkoffs 1 & 2 due Wed Jan 8 at 5 PM
Homework 2: Checkoffs 3, 4 & 5 due Fri Jan 10 at 5 PM
Here is a digital copy of the checkoff exercises for homework 2, as well as a digital copy of the optional homework 2 problems. For Homework 2, you'll need the homework_2a.py and homework_2b.py templates, as well as strings_and_lists.py and nims.py
Project 1: Hangman - Due Wed Jan 15
- * Hangman exercise writeup
- * hangman_template.py
- * words.txt
- * hangman_lib.py (Optional extension)
- * hangman_lib_demo.py (Optional extension)
Homework 3: Checkoffs 6 and 7 due Fri Jan 17 at 5 PM
Homework 4: Checkoffs 8 and 9 due Wed Jan 22 at 5 PM
Project 2: Simulating Robots - Due dates Wed Jan 22 at 5 PM through Fri Jan 24 at 5 PM
Take-Home Mini Quiz (OPTIONAL)
This mini quiz is totally and entirely optional. You don't need to turn it in, it is all for your benefit. You are, however, more than welcome to go over your solutions with the teaching staff, or get help if you are having trouble with any of the problems. However, do try to give this an honest shot, as it'll help you get a feel for your programming skills.
Handouts and Code Used in Lecture
The syllabus (PDF) explains the course and details the grading policy.
Getting Started explains how to get Python installed on your machine, and includes a few sample exercises to get you up and off the ground with Python!
Here is some sample code from material covered in class.
Here is the code we wrote today.
Here is lecture6.py, which contains information on dictionaries and checking if all items of a list satisfy a certain condition.
Here is point.py, which contains the Point class we defined in lecture today.
Here is the code from Day 8.
Here is the code from Day 9.
Here is lecture10.py, which contains examples of common mistakes we've seen.
Here is lecture11.py, which contains examples of simulations, including an example using classes that should help with your second project.
Here is monte_carlo_pi.py, which contains the example of using monte carlo simulation to estimate the value of pi. Here is comprehension_examples.py which shows some sample usage of list comprehensions.
Here is lecture13.py, which contains two simple recursive functions.