In this session, we introduce you to some of the core concepts of 6.01. We will also focus on programming, in particular the object-oriented programming paradigm in Python. Topics include primitives, expressions, assignments, functions, environments, OOP, and inheritance.
The overview handout provides a more detailed introduction, including the big ideas of the session, key vocabulary, what you should understand (theory) and be able to do (practice) after completing this session, and additional resources.
Read chapters 1-3 of the course notes.
- Chapter 1: Course Overview (PDF)
- Chapter 2: Learning to Program in Python (PDF)
- Chapter 3: Programs and Data (PDF - 1.6MB)
Watch the lecture video. The handout and slides present the same material, but the slides include answers to the in-class questions.
Lecture 1: Object-Oriented Programming (01:17:35)
Lecture 1: Object-Oriented Programming
About this Video
Introduction to the four modules of 6.01 (software engineering, signals and systems, circuits, probability and planning). The lecture then introduces object-oriented programming in Python, and ends with a discussion of environments.
These videos have been developed for OCW Scholar, and are designed to supplement the lecture videos.
Recitation 1: Object-Oriented Programming (00:11:22)
Recitation 1: Object-Oriented Programming
Recitation 2: Inheritance (00:13:26)
Recitation 2: Inheritance
The problems in the tables below are taken from the 6.01 Online Tutor, an interactive environment that is not available on OCW. Do not try to answer these questions in the PDF files; answers will not be checked, and cannot be submitted.
- Design Lab 1: Object-Oriented Programming (PDF)
- Code for Design Lab 1 (ZIP) (This ZIP contains: 1 .py file.)
|1.3.1||Fibonacci numbers (PDF)|
|1.3.2||Simple OOPs (PDF)|
|1.3.4||2D vector arithmetic (PDF)|
|1.3.5||Polynomial representations (PDF)|
|1.3.6||Polynomial class (PDF)|
|1.4.1||Structured assignments (PDF)|
|1.4.2||Nested and shared structure (PDF)|
|1.4.3||List comprehensions (PDF)|
|1.4.7||Palindrome [optional] (PDF)|
|1.4.8||Substring [optional] (PDF)|
|1.4.9||Extract tags [optional] (PDF)|
|1.4.10||Fruit class [optional] (PDF)|
|1.4.11||Warehouse [optional] (PDF)|
Nano-quiz problems and solutions are taken from a previous version of the 6.01 Online Tutor. Do not try to answer these questions in the PDF files; answers will not be checked, and cannot be submitted.