CSC 141 / QUIZ 3 / UNGRADED PRACTICE
A little practice before Tuesday.
Eleven short questions to help you prepare for Quiz 3. Predict first, choose an answer, then read the explanation.
Quiz: Tuesday, October 27, 2026, 11:00–11:15 AM.
Classes 14–16. Nine multiple-choice questions on loops and strings.
These are different questions from the graded quiz. Practice as often as you like. No name, student ID, or submission is required; this page does not record a grade.
Course home · Quiz 2 practice
What to review
- while loops: condition, body, update, and why a missing update never ends.
- for + range(start, stop, step): start included, stop excluded, negative steps.
- The accumulator and counting patterns, and the reset-inside-the-loop and off-by-one bugs.
- Strings: indexing (including negative indexes), slicing, for ch in s, and immutability.
For each snippet, trace the loop one pass at a time with a small table and write the exact output before checking it. The quiz will not ask you to write a complete program.