Lecture Presentations 2024a
Class No. Date Topics Slides Code + additional material Comments
1 31/12 Course administration


Python basics
PDF

PDF

PY ID.py
TXT log1.txt
Install Python: http://tau-cs1001-py.wikidot.com/python
2 3/1 Python basics (cont.): Conditionals, Boolean values and operators, loops, range, lists PDF PY sum.py
PY conditionals.py
3 7/1 More Python basics: list comprehension, functions, Python's memory model PDF

PDF
PY xor.py

PY palindrome.py

PY memory.py
Python Tutor: http://www.pythontutor.com/visualize.html#mode=edit
Examples in class
lists,
linear-combination,
modify_list,
nullify
4 10/1 Python's memory model (cont., see material from lec3),
More Collections (tuple, set, dict),
Randomness
PDF

PDF
PY char_count.py
PY random_walk.py
5 14/1 Types of errors; Guidelines for "good" programming PDF
6 17/1 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
- 21/1, 24/1 No regular class PDF
7 28/1 Floating points representation



Basic Algorithms:
Binary Search in sorted sequences
PDF


PDF
PY pi.py

PY search.py
8 31/1 Basic Algorithms (cont.):
Selection-sort, Merging sorted lists



Complexity and the O() notation
PDF


PDF
PY select_sort.py PY merge.py
9 4/2 Complexity and the O() notation (cont., using slides from last lecture)


Recursion (part 1): factorial, fibonacci, binary search




PDF
PY factorial_and_fibonacci.py PY rec_bsearch.py
10 7/2 Recursion (part 2): Quick-Sort, Merge-Sort, Towers of Hanoi PDF PY quicksort.py
PY mergesort.py
PY sorting_race.py

PY hanoi.py
11 11/2 Recursion (part 3): Monster of Hanoi (using slides from the previous lecture), Memoization

Integer Exponentiation
PDF

PDF
PY fib_memo.py

PY power.py
12 14/2 Integer Exponentiation (cont., using slides from the previous lecture)

Randomized primality testing
PDF PY primality.py
13 18/2 Randomized primality testing (cont., using slides from the previous lecture)

Diffie-Hellman key exchange
PDF PY DH.py
14 21/2 Intro to Object Oriented Programming (OOP)

Data structures: Linked lists
PDF

PDF
PY student.py

PY linked_list.py
15 25/2 Data Structures: Linked lists (cont., using slides from the previous lecture)

Data Structures: Binary Search Trees
PDF PY binary_search_tree.py
PY printree.py
16 28/2 Data Structures: Binary Search Trees (cont., using slides from the previous lecture)

Data Structures: Hash functions and Hash Tables
PDF PY hash.py
17 3/3 Data Structures: Hash functions and Hash Tables (cont., using slides from the previous lecture)

Data Structures: Generators for streams
PDF PY generators.py
18 6/3 Data Structures: Generators for streams (cont., using slides from the previous lecture)

Text compression: Huffman algorithm
PDF PY huffman_comp.py
19 10/3 Text compression: Huffman algorithm (cont., using slides from the previous lecture)

Text compression: Lempel-Ziv algorithm
PDF PY LZ.py
20 13/3 Text compression: Lempel-Ziv algorithm (cont., using slides from the previous lecture)

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