Quiz — Lecture 10
Section A from memory, one line each. Section B shows your reasoning - marks are for method, not final answers. Answers are discussed in class; the exit ticket goes on a card.
Section A
A1. What is s[-1] in Python?
A2. Why can't you assign s[0] = 'X'?
A3. Name the normalisation steps before comparing user text.
A4. How much memory does an 'ends with digit' check need?
Section B
B1. Classify 'ab1', 'abc', 'a1c' under: must start with a letter, must end with a digit.
B2. Fill the template 'Dear {name}, your {item} is ready.' for name=Bo, item=parcel - what does the code split on?
Exit ticket
Answer one of these on your card in 60 seconds (choose any one):
- Why normalise before comparing strings?
- What does immutability of strings imply for building output?
- When is slicing clearer than a loop?
Homework
- Before: skim the four student pages; attempt case 1 on paper.
- After: write a five-line pseudocode solution for any case you did not
- Enrichment (optional): the stretch question on each case page.