Quiz — Lecture 06
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 are the columns of a trace table?
A2. What identifies a loop's termination variable?
A3. In a 4x3 nested loop (outer 4, inner 3), how many inner-body executions?
A4. What changes in the trace if a condition >= becomes > ?
Section B
B1. Trace the tally loop for pages [12, 0, 25] with target 10: give all three rows.
B2. Prove the nested grid loop terminates by naming its shrinking quantity.
Exit ticket
Answer one of these on your card in 60 seconds (choose any one):
- What belongs in every column of a state table?
- Give the two classic off-by-one causes.
- When does a nested loop's inner count matter most?
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.