Unit 2 · Programming 1 · Lesson 2.20 · Test

Test Day

You take the Unit 2 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 2.1–2.18. The fastest revision is the drill in 2.19, not re-reading.

1

Where We Are

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

Last stop in Programs for now. The test is a checkpoint on four weeks, not a new idea. Next unit you keep writing programs — but you teach them to repeat steps with loops.

2

What’s on the Test

70 points. About eighteen multiple-choice questions, plus one short written response. It leans hard on tracing — reading code and predicting the output — and several questions are written only in AP Pseudocode. No calculator; every number is small enough for paper. No penalty for guessing, so never leave one blank.

The multiple-choice questions spread across the unit in roughly these proportions. This is the map of where the points are — study to it.

What it testsFromRoughly
Assignment sequences (trace the variables)2.22–3 Q
Expressions and MOD (%, even/odd, last digit)2.32–3 Q
Strings and f-strings2.6, 2.71–2 Q
Booleans and comparisons (= vs ==)2.112 Q
if / else and elif chains (trace which branch)2.12, 2.133–4 Q
Nested conditionals (deeper traces)2.132 Q
Logical operators AND / OR / NOT2.142–3 Q
Error types and edge cases2.8, 2.161–2 Q
The written response. One short program (about six lines), and you explain what it does and its purpose — in plain English, not line-by-line narration. The points are in naming the overall job and the role of the conditional, using unit terms (condition, branch, variable, expression) correctly. This is Create PT muscle memory. Practice one in section 5.
3

How to Review — the Last 20 Minutes

Retrieval beats re-reading. Make yourself produce the answer before you check. Here’s the order that pays off fastest:

The 20-minute plan

1. Say the unit in one breath (2 min). “A program stores values, computes, talks to the user, and makes decisions.” Expand each. Where you stall is what to study.

2. Run the five traps (5 min). Below — the pairs that cost the most marks.

3. Drill traces cold (5 min). The 2.19 trace race, especially the pseudocode ones.

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 real points. Thirty seconds each:

Don’t confuseThe one-line difference
= vs ==One = assigns (puts a value in the box). Two == compares (asks if equal).
/ vs %/ divides; % (MOD) keeps the remainder. n % 2 == 0 is the even test.
if/elif chain vs separate ifsA chain stops at the first True; separate ifs each fire, so several can run.
and vs orand needs both True; or needs just one. Only and fails when one side is False.
syntax vs run-time vs logic errorSyntax = won’t run; run-time = crashes mid-run; logic = runs but wrong.

Want the interactive version? Lesson 2.19 has the map rebuild and the full trace race — the single best 15 minutes of revision on the site.

4

Practice Set

Six mixed questions in AP format, sampled across the unit, several in pseudocode only. None of these is on the real test — they’re for calibration. Pick an answer to see feedback immediately.

0 of 6 answered
5

Written-Response Practice

Try one, the way the real one is scored

Prompt. Explain what this program does and its purpose. Write three or four sentences — describe the overall job, not each line in turn.

# mystery program
n = int(input("Number? "))
count = 0
if n % 2 == 0:
    count = count + 1
if n % 7 == 0:
    count = count + 1
print(count)

Write your answer before you open the checklist below.

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

□ Names the overall job. It counts how many of two properties a number has — being even and being a multiple of 7 — and prints that count (0, 1, or 2).

□ Explains the conditionals’ role. Each if tests one condition with MOD; when the condition is True, that branch adds 1 to the running count variable.

□ States the purpose, not the syntax. “It reports how many of these two divisibility rules the input satisfies” — not “line 3 checks n mod 2.”

□ Uses terms correctly. condition, variable, expression — each meaning what it should. (For the curious: input 14 prints 2; input 9 prints 0.)

The one habit that scores

Describe purpose, not mechanics. “It counts divisibility properties” beats a line-by-line retelling. Saying what a program is for, in a sentence, is exactly what the Create PT written responses reward.

6

Connections

Came from all of Unit 2 — nothing on the test is new. If a row in the section 2 table feels shaky, that’s the lesson to reopen right now.
Opens Unit 3 — loops. You’ll stop writing each step by hand and teach the machine to repeat — and the running-count pattern above becomes the accumulator.
Feeds the Create PT — the written response is the PT’s “explain your selection” question in miniature. Every rep now is a point in May.
Returns on the AP exam — Big Idea 3 is the largest slice of the exam. Tracing conditionals fluently is the cheapest way to earn those points.
← 2.19 Rebuild the Map & Review