Lecture Presentations
Class No. Date Topics Slides Code + additional material Comments
1 26/10 Course administration


Python basics
PDF

PDF

PY ID.py

TXT log1.txt
Python information: http://tau-cs1001-py.wikidot.com/python
2 29/10 Python basics (cont.): Boolean values and operators, Conditionals, loops, range, lists PDF PY conditionals.py

PY sum.py
3 2/11 More Python basics: lists, functions


Python's memory model
PDF PY xor.py
PY palindrome.py
4 5/11 Python's memory model



Error types, writing "good" code
PDF


PDF
Python Tutor: http://www.pythontutor.com/visualize.html#mode=edit

linear_combination

modify_list

assign_list
5 9/11 Integer representation in binary (and other bases)


Text representation, ASCII and Unicode
PDF

PDF



PY text2bits.py
See highly recommended sources for more exercise in the slides
6 12/11 Floating point representation



Randomness
PDF


PDF
PY random_walk.py PY pi.py
7 16/11 Basic Algorithms: Binary search, Selection sort, Merging sequences



Complexity and O notation
PDF



PDF
PY search.py
PY select_sort.py
PY merge.py
8 18/11 Complexity (cont., using slides from previous lecture)



Numerical computation





PDF





Note: Derivatives and integrals not covered this semester
9 23/11 Recursion (part 1):

factorial, Fibonacci numbers, binary search (again), Quicksort

PDF
PY factorial_and_fibonacci.py
PY rec_bsearch.py
PY quicksort.py
10 26/11 Recursion (part 2): Mergesort,







Memoization
PDF





PDF
PY mergesort.py
PY sorting_race.py


PY fib_memo.py
11 30/11 Recursion (part 3): Towers of Hanoi,


Chomp!
PDF


PDF
PY hanoi.py
PY chomp.py
12 3/12 Recursion: memory complexity


Number Theory (part 1): Integer Exponentiation
PDF


PDF





PY power.py
13 7/12 Number Theory (part 2): GCD



Prime numbers
PDF


PDF
PY gcd.py


PY primality.py
14 10/12 Topics from Number Theory (part 3): Prime numbers (leftovers from last time),
Diffie Hellman Secret Key Exchange,


Intro to Object Oriented Programming (OOP)
PDF



PDF

PY DH.py

PY student.py
15 14/12 Intro to OOP (cont., using slides from previous lecture)


Data structures: Linked lists



PDF
PY rational.py

PY linked_list.py
16 17/12/25 Leftovers from linked lists


Data structures (2): Binary search trees
PDF PY binary_search_tree.py
17 24/11 Leftovers from binary search trees


Data Structures (3): Hash functions and hash tables
PDF PY hash.py
18 28/12 Data Structures (4): More on hash tables (using slides from previous lecture)



Generators for streams





PDF





PY generators.py
19 31/12 Algorithms on text (1): grammars and the CYK parsing algorithm PDF PY cyk.py Python's grammar: https://docs.python.org/3/reference/grammar.html
20 4/1/26 Algorithms on text (2): Huffman compression PDF PY huffman_comp.py
21 7/1 Algorithms on text (3): Lempel-Ziv compression PDF PY LZ.py
22 11/1 Lempel-Ziv compression (cont.)



Error detection and correction codes




PDF




PY error_codes.py
23 14/1 Error detection and correction codes (slides from last lecture)
24 18/1 Introduction to digital images representation and processing PDF PY images_with_PIL.py
PY noise.py
Installing PIL: https://pillow.readthedocs.io/en/latest/installation/basic-installation.html


Recommended link: https://csfieldguide.org.nz/en/chapters/data-representation/images-and-colours/
25 21/1 Digital images - exercises

A glimpse into the limitations of computing (last slides from lecture 19)

Course summary and the exam
PDF


PDF
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License