Submit
Submit your lab code here and see the result straight away. When you are done, download the report and hand that in on Canvas — your code is embedded in it, so there is no separate .py to submit.
Homework
Each one covers two to four weeks of lab work and is submitted once. The problems on the platform can be submitted any time and are graded on the spot.
- Homework 1Setup, characters and numbers, strings and functionsWeeks 1–3Sat 10 Oct, 23:59
- Homework 2Control flow, lists, choosing a containerWeeks 4–6Tue 27 Oct, 23:59
- Homework 3Recursion, the command line and AI review, classesWeeks 7–9Tue 17 Nov, 23:59
- Homework 4· not open yetInheritance and modules, complexity and testing, text processingWeeks 10–12Tue 8 Dec, 23:59
- Homework 5· not open yetIterators and generators, functional programmingWeeks 13–15Tue 29 Dec, 23:59
Solo assignments
One topic taken all the way down, two weeks each. The three together are worth 15% of the final mark.
- Solo assignment 1 — Towers of Hanoi· not open yetThe basic solution, the optimal solution when only adjacent pegs may be used, and why it takes 3ⁿ−1 movesWeeks 7–8Tue 10 Nov, 23:59
- Solo assignment 2 — Counting primes five ways· not open yetBrute force, √n pruning, 6k±1, the sieve of Eratosthenes, Miller-Rabin — and a timing comparisonWeeks 10–11Tue 1 Dec, 23:59
- Solo assignment 3 — Arbitrary-precision integers· not open yetImplement + − × ÷ ** over strings, with a short technical reportWeeks 12–13Tue 15 Dec, 23:59
Team project
In pairs. The single largest item this term, worth 25%.