Reading material#

The main course material is the book Think Python by Allen Downey. This is a comprehensive book designed for teaching programming to university-level beginners. The syllabus for the courses 02002/02003 aligns closely with the content of the book, although we introduce a few concepts in a different order. Additionally, the book uses examples from the turtle module which we omit entirely. We also skip regular expressions and we spend less time on recursion. In addition to the book, we will be using a supplementary material.

CS50 is an introductory programming course offered by Harvard University, with a wealth of course material publicly available. When referring to CS50, we will provide links to the lecture notes, but you can also solve exercises or watch recordings of the lectures, which are both inspiring and informative. CS50 introduces a few more topics than we do in the course 02002/02003; for example, we don’t cover pillow library, pytest library, regular expressions, or advanced features of object-oriented programming.

W3Schools is an online platform for learning programming and web development tools. Their Python tutorial covers both introductory and advanced Python features, so it may be too detailed for beginners. However, W3Schools is great if you need to check Python syntax, and for this, they provide an excellent try-it editor.

Additional resources which we only use in a limited capacity are:

Overview of reading material for all weeks#

Week 1: Introduction#

The content of this week roughly corresponds to Think Python (TP), Chapter 1 Programming as a way of thinking.

The small differences between the book and the course are in the order of introducing concepts:

  • We postpone a formal definition of types to next week.

  • We use print statements already this week (the book introduces print statements in Chapter 2).

  • We cover comments already this week (the book introduces comments in Chapter 2).

Week 2: Variables and types#

The content of this week corresponds to Think Python (TP), Chapter 2 Variables and Statements supplemented with the first three sections of Chapter 5 Conditionals and Recursion. In Chapter 2, you can skip the part about the state diagram, as we do not use state diagrams in our course.

You can also find the content of this week in the lecture notes for the CS50 course, Lecture 0 Functions, Variables. We cover sections on integers, floats (two sections), and strings (two sections).

Week 3: Conditionals#

This week corresponds to parts of Think Python (TP) Chapter 5 Conditionals and Recursion. The sections covered are: if statement, The else clause, Chained conditionals, and Nested conditionals.

Alternatively, conditionals are also covered in the lecture notes for the CS50 Course, Lecture 1 Conditionals, only the first 4 sections.

Week 4: Loops#

In the Think Python (TP) book, loops are covered in Chapter 7 Iteration and Search. However, the book shows looping on strings which we haven’t studied yet, and it explains only for-loops, but in the course, we teach both the for-loop and the while-loop.

Therefore, this week is better aligned with the lecture notes of the CS50 course, Lecture 2 Loops, first three sections.

Week 5: Functions#

In the Think Python (TP) book, void functions are covered in Chapter 3 Functions (you can skip the section on stack diagrams). Functions with return statements are covered in the first 5 sections of Chapter 6 Return Values.

In the CS50 course, the concept of functions was introduced already in Lecture 0 Functions, Variables, section Def.

Week 6: Lists#

In the Think Python (TP) book, lists are covered in Chapter 9 Lists.

Week 7: Strings#

In the Think Python (TP) book, strings are covered in the first 5 sections of Chapter 8 Strings and Regular Expressions.

Additionally, we also cover f-strings, which the book introduces in the second section of Chapter 13 Files and Databases.

Week 8: Dictionaries and tuples#

In the Think Python (TP) book, dictionaries are covered in Chapter 10 Dictionaries, you can skip the section on memos. Tuples are covered in Chapter 11 Tuples, and we cover the first 4 sections.

Week 9: Files#

In the Think Python (TP) book, filenames and paths are covered in the first section of Chapter 13 Files and Databases: Filenames and paths.

For writing and reading files, look at the first three sections of the lecture notes for the CS50 Course Lecture 6 File I/O.

Week 10: Classes I#

This week roughly corresponds to the first 5 sections of Think Python (TP) book Chapter 14 Classes and Functions. We also introduce the concept of methods and the __init__ method, which in the book is covered in Chapter 15 Classes and Methods, sections 1 to 3 and section 6.

Looking at the lecture notes for the CS50 course, this week corresponds to the first two sections of Lecture 8 Object-Oriented Programming.

Week 11: Classes II#

In the Think Python (TP) book, inheritance is covered in Chapter 17 Inheritance. Operator overloading is covered in one section of Chapter 15 Classes and Methods.

Looking at the lecture notes for the CS50 course, this week is covered in two sections of Lecture 8 Object-Oriented Programming, sections on inheritance and operator overloading.

Week 12: Numpy and matplotlib#

A good introduction to NumPy is provided by W3Schools Introduction to NumPy.

At W3Schools, you can also find a good Matplotlib Tutorial.

Week 13: Modules#

Using made modules and making your own is covered in the CS50 course in Week 4 Libraries, section Libraries, Packages, and Making Your Own Libraries.