Python Tutorial

Functions and Scope

« Previous | Next »

Before starting these problems, please read:

The problems in the table below are taken from the 6.01 Python 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.

PROBLEM # QUESTIONS
2.1.1 Fun with functions (PDF)
2.1.2 Functions and scope (PDF)
2.1.3 Scoping (PDF)
2.2.1 Square (PDF)
2.2.2 Fourth power (PDF)
2.2.3 Odd test (PDF)
2.2.4 From point A to point B (PDF)
2.2.5 Evaluate a quadratic at a point (PDF)
2.2.6 Distance from point to line (PDF)

« Previous | Next »

Learning Resource Types
Lecture Videos
Recitation Videos
Problem Sets
Exams with Solutions
Lecture Notes
Instructor Insights
Programming Assignments
Exams