Unit 3 · Programming 2 · Lesson 3.20 · Test

Test Day

You take the Unit 3 test in class today. This page is everything you can do before it — what’s on it, how to revise, and practice that isn’t on the real test. There are no test questions here.

Big Idea 3 — Algorithms & ProgrammingAssessment — review only

Before this lesson

No new reading. Everything on the test comes from 3.1–3.19. The fastest revision is the 3.19 gym, not re-reading.

1

Where We Are

People→ Bits→ Programs→ Internet→ Security→ Big Data→ Impact

A checkpoint on the biggest unit of the year. Nothing here is new. After the test, Week 5 is the Create PT dress rehearsal — where all of this becomes a program that is yours.

2

What’s on the Test

70 points. About twenty multiple-choice questions, plus one short written response. The majority are in AP Pseudocode, and it leans hard on tracing: accumulators, the index flip, return vs display, and REPEAT UNTIL negation. No calculator; trace on paper. No penalty for guessing.

Where the points are — study to this map:

What it testsFromRoughly
Loop traces (while, for, how many times)3.1, 3.33 Q
while ↔ REPEAT UNTIL negation3.22 Q
Accumulator traces (sum / count / max)3.4, 3.93–4 Q
List indexing & the 0-vs-1 flip3.62–3 Q
Traversal (FOR EACH) — "what does it compute?"3.82 Q
Procedures: parameter/argument, what it returns3.11–3.122 Q
return vs display3.132 Q
Random range & libraries3.16–3.171–2 Q
The written response. One short procedure, and you explain how it works in PT-rubric language: name what it takes (its parameter), what it does (iteration, selection), and what it returns — and its purpose. This is the 3.15 sentence, graded. Practice one in section 5.
3

How to Review — the Last 20 Minutes

Retrieval beats re-reading. Produce the answer before you check. Fastest order:

The 20-minute plan

1. Say the unit in a breath (2 min). “Loops repeat, lists hold many, procedures package and reuse.” Expand each.

2. Run the five traps (5 min). Below.

3. Drill traces cold (5 min). The 3.19 gym, especially the robot and REPEAT UNTIL items.

4. Take the practice set (8 min). Section 4 — fresh questions, none on the real test.

The five traps

Every one has cost real students points. Thirty seconds each:

Don’t confuseThe one-line difference
while vs REPEAT UNTILwhile loops while TRUE; REPEAT UNTIL loops until true (while FALSE) — opposite conditions.
index 0 vs index 1Python’s first element is [0]; AP’s is [1]. Count from the notation’s start.
return vs displayreturn hands a value back to the program; DISPLAY only shows it on screen.
max init 0 vs init list[0]Starting max/min at 0 breaks on all-negative data; start at the first element.
range end vs RANDOM endrange stops BEFORE its end; RANDOM includes both ends.

Want the interactive version? Lesson 3.19 has the robot stepper and the full gym.

4

Practice Set

Six mixed questions in AP format, most in pseudocode. None is on the real test — they’re for calibration. Pick an answer for instant feedback.

0 of 6 answered
5

Written-Response Practice

Try one, the way the real one is scored

Prompt. Explain how this procedure works and what its purpose is. Name its parameter, what it does to the list, and what it returns.

PROCEDURE mystery(nums)
{
    best ← nums[1]
    FOR EACH x IN nums
    {
        IF (x > best) { best ← x }
    }
    RETURN (best)
}

Write three or four sentences before opening the checklist.

What a full-credit answer does — check yours against this:

□ Names the purpose. It finds and returns the largest value in the list.

□ Names the parameter. It takes a list, nums, as its parameter.

□ Describes the mechanism. It starts best at the first element, then uses iteration to check each value and selection to keep any larger one.

□ Notes the return. After the loop it returns best — the maximum. (Starting at nums[1], the first element, is what makes it correct even for all-negative lists.)

The habit that scores

Describe purpose and mechanism, not a line-by-line reading. “It returns the largest element by keeping a running maximum” beats “line 3 sets best, line 4 loops…” Naming the parameter, the iteration, the selection, and the return is exactly the Create PT written response.

6

Connections

Came from all of Unit 3 — nothing on the test is new. A shaky row in the section 2 table is the lesson to reopen now.
Next is Week 5 — the Practice PT dress rehearsal: you build your own program with these exact ingredients and explain it in writing.
Feeds the Create PT — the written response is the PT’s “explain your procedure” question, a school year early.
Returns on the AP exam — Big Idea 3 is the largest slice of the exam, and this unit is its core. Automatic tracing is the cheapest way to those points.
← 3.19 Pseudocode Gym II