Skip to main content

Prerequisite Diagnostic

Spend 20–30 minutes before starting. This checks earlier programming and proof skills, not the algorithms taught here. Explain each answer before opening the key.

  1. List the values of i and j for for i in range(4): for j in range(i): emit(i,j).
  2. State a base case and inductive step proving 1+...+n=n(n+1)/2.
  3. Trace integer division and the half-open slice indices in [0,4): what is (0+4)//2, and which indices are included?
  4. List all subsets of three labeled items. How many are there? Do labels preserve two items with equal values as distinct choices?
  5. Explain why a function passing ten examples does not prove it correct on every allowed input.
Answers and repair
  1. Pairs (1,0),(2,0),(2,1),(3,0),(3,1),(3,2); six emissions. Repair nested-loop tracing in programming foundations, then repeat with range(5): ten emissions.
  2. Base n=0 has sum0; adding k+1 to k(k+1)/2 gives (k+1)(k+2)/2. Repair induction in Semester1's proofs module; then prove the sum of the first n odd numbers is n².
  3. Midpoint2; included indices 0,1,2,3. Repair index conventions; then trace [2,5) with midpoint3.
  4. Empty, three singletons, three pairs, full set: eight. Distinct labels remain distinct even if values coincide. Repair subset enumeration in combinatorics; four labeled items give16 subsets.
  5. Untested inputs can violate the claim. Repair the distinction between a counterexample, finite evidence, and a universal proof.

Fix each missed prerequisite before its corresponding cluster. No overall percentage can compensate for being unable to trace a loop. Use the assessment map to distinguish entry skills from completion evidence.