Lecture Presentations 2025a
Class No. Date Topics Slides Code + additional material Comments
1 3/11 Course administration


Python basics
PDF

PDF

PY ID.py
Python information: http://tau-cs1001-py.wikidot.com/python
2 6/11 Python basics (cont.): Conditionals, Boolean values and operators, loops, range, lists PDF PY sum.py
3 10/11 More Python basics: lists, functions


Python's memory model (1st part)
PDF

PDF
PY xor.py
PY palindrome.py
4 13/11 Python's memory model (cont., see material from lec3),
More Collections (tuple, set, dict),




Randomness
PDF






PDF
PY memory.py
PY char_count.py


PY random_walk.py
Python Tutor: http://www.pythontutor.com/visualize.html#mode=edit

linear_combination

modify_list
5 17/11 Randomness (using slides from precious lecture)


Integer representation in binary (and other bases)



PDF



See highly recommended sources for more exercise in the slides
6 20/11 Representing integers (using slides from previous lecture)



Text representation, ASCII and Unicode



Floating point representation





PDF

PDF

PY text2bits.py
Last few slides on estimating Pi are delayed to a later class
7 24/11 Basic Algorithms 1: Binary search


Errors in Python and "Good" programming guidelines
PDF

PDF
PY search.py



8 27/11 Basic Algorithms - cont': Selection sort
merging sorted lists


Introduction to Complexity and the O() notation
PDF

PDF
PY select_sort.py
PY merge.py
9 1/12 Complexity (cont., using slides from previous lecture)



Numerical computation





PDF
PY pi.py
PY root.py
PY derivation_integration.py
10 4/12 Recursion (part 1):

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

PDF


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


Memoization
PDF


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


Chomp!
PDF


PDF
PY hanoi.py
PY chomp.py
13 15/12 Topics from Number Theory (part 1):

Integer Exponentiation,


GCD
PDF

PDF
PY power.py
PY gcd.py
14 18/12 Topics from Number Theory (part 2): Prime numbers PDF PY primality
15 22/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
16 25/12 Intro to OOP (cont., using slides from previous lecture)

Data structures: Linked lists



PDF
PY rational.py

PY linked_list.py
17 1/1/25 Data structures (2): Binary search trees PDF PY binary_search_tree.py
18 5/1 Data Structures (3): Hash functions and hush tables PDF PY hash.py
19 8/1 Data Structures (4): More on hash tables (using slides from previous lecture)



Generators for streams





PDF





PY generators.py
20 12/1 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
21 15/1 Algorithms on text (2): Huffman compression PDF PY huffman_comp.py
22 19/1 Algorithms on text (2): Lempel-Ziv compression PDF PY LZ.py
23 22/1 Error detection and correction codes PDF PY error_codes.py
24 26/1 Error detection and correction codes (cont., using slides from last lecture)


Introduction to digital images: representation



PDF



PY images_with_PIL.py
Installing PIL: https://pillow.readthedocs.io/en/latest/installation/basic-installation.html
25 29/1 Introduction to digital images: noise reduction and more slides from last time PY noise.py
PDF Exercises (solved in lec. 26)
PY solutions
26 2/2 Leftovers (digital images)

A glimpse into the limitations of computing (slides 45-51 in lecture 20)

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