Note that the schedule of lectures is tentative and may change, particularly with respect to guest lecturer availability.
Week 1 (19 - 23 February)#
- Monday lecture: Introduction to the course and administrative matters (slides).
- Tuesday lecture: Functional abstraction (slides).
Week 2 (26 February - 2 March.)#
Reading guide:
- In Downey: Chapters 1, 2 and 3.
- In Punch & Enbody: Chapter 1 (excluding 1.10) and the beginning of Chapter 6, up to (not including) 6.3.3.
Week 3 (5 - 9 March.)#
- Monday lecture: Program control flow, part 1: Branching (slides).
- Tuesday lecture: Program control flow, part 2: Iteration (slides).
Code examples:
Falcon Rocket Example - Lecture 6
Reading guide:
- In Downey: Chapter 5, Chapter 6 up to (not including) section “More Recursion”, and Chapter 7.
- In Punch & Enbody: Chapter 2, except the parts about
for
loops (for example, section 2.2.13).
Week 4 (12 - 16 March)#
-
Monday 12 March is a public holiday.
- Monday lecture: No Lecture
- Tuesday lecture: Strings (slides).
Reading guide:
- In Downey: Chapter 8.
- In Punch & Enbody: Chapter 4, except sections 4.4 and 4.7.
Week 5 (19 - 23 March)#
Reading guide:
- In Downey: Chapter 10.
- In Punch & Enbody: Chapter 7, except 7.7. Note: Sections 7.5.2 and 7.9 contain examples that use file reading, which we have not covered yet. You can skip these sections, or just just copy-paste the file-reading code and not worry too much about it.
- The python documentation has a section about floating-point numbers.
- http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html presents a very detailed, quite mathematical, look into floating point number representation and arithmetic.
- Here is a video of a very interesting talk: https://www.youtube.com/watch?v=aP0Y1uAA-2Y. The speaker discusses alternative number systems for representing and computing with fractional numbers. Maybe soon we will not be using floats at all!
Week 6 (26 - 30 March)#
-
Friday 30 March is a public holiday.
- Monday lecture: NumPy and NumPy arrays (slides).
- Tuesday lecture: Revision and Preparation for Mid-Semester Exam (no-slides).
Neither text book has much material on NumPy.
Break#
Week 7 (16 - 20 April)#
- Monday lecture: No Lecture.
-
Tuesday lecture: No Lecture
- Recorded Lecture: More about functions, variable scope and recursion. (slides).
Reading guide:
- In Downey: Chapters 3, 5 and 6; section “Global variables” in Chapter 11.
- In Punch & Enbody: Chapter 6, up to (not including) section 6.3.4; Section 8.1; Section 9.6.
Week 8 (23 - 27 April.)#
-
Wednesday the 25th is a public holiday.
- Monday lecture: I/O and files (slides).
- Tuesday lecture: Dictionaries and sets (slides).
Reading guide:
- In Downey: Chapter 14, up to section 14.4 “Catching Exceptions”; Chapter 11, except section “Memos” (we will talk about dynamic programming in a future lecture) and relevant parts of Chapter 12.
- In Punch & Enbody: Chapter 5, up to (not including) section 5.6; Chapter 9.
Week 9 (30 April - 4 May)#
Reading guide:
- In Downey: Chapter 20, and section “Catching Exceptions” in Chapter 14.
The
assert
statement is only mentioned briefly in Chapter 16, which otherwise is about things we do not cover in the course. - In Punch & Enbody: Section 5.6 and Sections 14.4 to 14.6 cover exceptions (with a focus on handling, unfortunately).
Week 10 (7 - 11 May)#
- Monday lecture: Algorithm and problem complexity (slides).
- Tuesday lecture: Data Visualisation in Python (slides).
Reading guide:
- Downey: Appendix B presents a short introduction to algorithm complexity analysis.
- Punch and Enbody does not cover algorithm complexity analysis.
Week 11 (14 - 18 May)#
- Monday lecture: Writing python modules and programs (slides).
- Tuesday lecture: Defensive programming and debugging (slides).
Reading guide:
- There is only a short section called “Writing Modules”, in Chapter 14, in Downey’s book.
Week 12 (21 - 25 May)#
- Monday lecture: Review of the mid-semester exam.
- Tuesday lecture: The Tuesday lecture will be used to continue the exam review, if the time in the Monday lecture is not enough.