Lecture calendar

Lecture live stream

                  LecturesReading and Materials
Week 1

Lectures 1 and 2: Welcome to ESC180 (Slides 1-43). Expressions and variables. A very simple program. Conditionals. The quadratic equation. Numerical types (if there is time). Lecture 1 recording, Lecture 2 recording, Lecture 3 recording (local and global variables)

Suggested readings for the next couple of lectures: Downey chapters 1-2 and/or Gries chapters 1-2. Note: you're only responsible for the material in lecture. However, some people learn best by reading, which is why I'm listing readings.

Learning outcomes: be able to run a very simple Python program in PythonTutor. Undrestand that a program is a series of instructions. Understand what syntax is, both in natural (human) languages and in programming languages.

Just for fun: Timothy Gowers, Why isn't the Fundamental Theorem of Arithmetic Obvious. Colorless green ideas sleep furiously.

Week 2 Slides (Slides 44-62)

Recordings:

  • Sept 9: functions, global and local variables, main block, swapping variables (Slides 43-45)
  • Sept 10: functions, global and local variables continued, Boolean values, Boolean expressions, conditionals (Slides 43-55)
  • Sept 12:variable naming conventions, conditionals example for Lab 2, for-loops: power, is_prime (Slides 56-62)


Suggested readings continue reading Downey Ch. 1-2 and/or Gries Ch. 1-2.

Suggested readings: Downey Ch. 3, Gries Ch. 3

Learning outcomes: Be able to trace Python programs in PythonTutor. Be able to write simple functions. Understand the distinction between syntax errors and "name not found" errors in Python. Be able to identify some syntax errors and name not found errors in simple examples. Understand that Python executes code line-by-line and understand why Python cannot find "name not found" errors ahead of time. Understand that string, float, and int types are different. Understand the difference between int and floats types. Understand the limitations of the float types. Understand why comparisons between floats and ints can be problematic. Understand why physical measurements can usually be stored in a float. Understand conversion between different types, and understand why e.g. "42" + 42 will produce an error but "42" + str(42) won't.

Week 3 Slides (Slides 63-68) Recordings:

Week 4 Slides (Slides 69-75) Recordings:
Week 5 Slides Recordings:

Week 6 Slides Recordings:
Week 7 Recordings:

Week 8 Slides Recordings:
Week 9 Slides Recordings:

Week 10

Slides: Project 3 intro Recordings: