Skip to main content

Prerequisite Diagnostic

Spend 30–45 minutes before opening the feedback. These are prerequisites, not a test of the strategies you are here to learn.

  1. Trace total=0; for x in [2,-1,4]: total += x after each iteration.
  2. Negate “every input has at least one valid output.” State the domains.
  3. List all subsets of {a,b}. Distinguish the empty set from no result.
  4. Solve 2x+3=11, then substitute the result into the original equation.
  5. Explain what additional information you need to evaluate “this code is fast.”

Feedback and routing​

  1. Totals 2, 1, 5: repair basic loop tracing in Semester 0 if needed.
  2. “There exists an input with no valid output”: repair quantifiers in Module 1.
  3. Empty, {a}, {b}, {a,b}: repair finite sets in Module 1.
  4. x=4, verified by 8+3=11: repair arithmetic before numerical examples.
  5. Input sizes/distribution, operations or timing boundary, machine and target. An incomplete answer is a prompt to learn cost contracts here, not a blocker.

Write one fresh example for a missed prerequisite. Continue when you can trace and explain it unaided; do not repeat whole books for an isolated gap.