Lecture: Introduction to Python
Slides
PDF files of the lecture slides handouts.
Readings
These suggested readings are important because they explain the terminology used in our lectures and labs. They also talk about common practices such as debugging, how to name variables, or the difference between interactive and script mode in Python.
- Think Python, Ch. 1: The Way of the program
- Think Python, Ch. 2: Variables, expressions and statements
If you are someone who likes to test the vocabulary of a new knowledge domain (in this case, programming), here is an interactive page with the Think Python vocabulary on Memrise.
Code
Click on this lec02_python_intro.zip link to download the .zip file to your computer.
Unzip the downloaded lec02_python_intro.zip
file (by double-clicking on it) to reveal a folder with the notebook file for this lecture and the nameage.py
Python program file shown in slide 2-24.
Solutions (for after class)
Use these sample solutions for review only after you have completed the code exercises. You will learn much more by trying them first and comparing your approach with the solutions.