🚀 Vocabulary Launchpad

CSP • everything you already own, then the words for 1.1.4 Spinning with Spirographs

Section 1 • 24 points

Words You Own

Second advisory, back into code. You are not starting over — you already used all eight of these in a program that ran. Click a word, then click its meaning. Eight pairs, three points each. A wrong pair costs one point, so read first.

Words

Meanings

Section 2 • 20 points

Spot It In Code

A word you can define but cannot find is a word you do not own yet. Click the exact piece of the line being described. Four questions, five points each. One shot each.

Section 3 • 16 points

Turtle Toolbox

1.1.4 asks you to build a spirograph. You cannot do it with .forward() and .right() alone. Here is the whole toolbox — this table is open while you work.

MethodWhat it does
.forward(d)Moves the turtle d pixels in the direction it is already facing.
.backward(d)Moves d pixels opposite the way it is facing. The turtle does not turn around.
.right(a)Turns right a degrees. Does not move.
.left(a)Turns left a degrees. Does not move.
.setheading(h)Points the turtle at an absolute heading, 0 to 360. Not a turn — a reset.
.heading()Hands back the heading it is facing right now. Note the empty parentheses.
.goto(x, y)Moves straight to the coordinate x, y.
.xcor() · .ycor()Hands back the turtle's current x or y. You will use .ycor() as a loop condition in 1.1.4.
.circle(r)Draws a full circle of radius r. The centre is r pixels to the turtle's left.
.circle(r, a)Draws only an arc, a degrees of that circle.
.circle(r, a, s)Draws that arc in s straight steps, so you get a polygon instead of a curve.
.dot(s)Drops a filled dot of diameter s. No movement, no turn.
.stamp()Stamps a copy of the turtle's own shape where it stands.
.penup()Lifts the pen. Move now and nothing is drawn.
.pendown()Puts the pen back down so drawing resumes.
.pensize(s)Sets line thickness to s.
.pencolor(c)Sets the line colour. c is a string: "red".
.fillcolor(c)Sets the inside colour for the next filled shape.
.begin_fill()Call it before you draw the shape you want filled.
.end_fill()Call it after. Miss this and nothing fills.
.speed(s)Speed 0 to 10. .speed(0) is instant — you will want it for spirographs.
.shape(s)"arrow", "turtle", "circle", "square", "triangle", "classic".
.turtlesize(s)Scales the turtle sprite itself, not the drawing.
.hideturtle() · .showturtle()Hides or shows the sprite. The drawing stays either way.
Read the dot. In painter.circle(50), painter is the object, .circle is the method, and 50 is the parameter. Object on the left of the dot, action on the right, instructions inside the parentheses. Every line in 1.1.4 reads that way.

Toolbox drill

Four questions, four points each. Scroll up to the table — using it is the point.

Section 4 • not graded

New Words — Predict First

These eight words are the whole of Activity 1.1.4. You have not been taught them yet. That is on purpose. Guess from the word itself and from code you have already written. Nothing here is marked right or wrong. Your pick locks in purple, and Section 5 shows you what it actually means.

Why guess at all? Because you remember a word you committed to far better than a word you were handed. Commit, then get corrected. That is the whole trick.
Section 5 • 12 points

The Reveal

Here is what those eight words actually mean, and the two that will cost you a class period if you get them wrong. Two scored checks at the bottom, six points each.

1 · Relational operator & Boolean

A relational operator compares two values. It does not store anything and it does not do math. It hands back a Boolean — one of exactly two values, True or False. There is no third option.

PythonReads asCollege Board writes it
==is equal toa = b
!=is not equal toa ≠ b
>is greater thana > b
<is less thana < b
>=is greater than or equal toa ≥ b
<=is less than or equal toa ≤ b
The one that bites everybody. = is a command: put the right side into the left side. == is a question: are these two the same? On the AP exam the College Board writes equality as a single =. In Python that single = would assign instead of compare. Two different pens, same symbol.

2 · The while loop

A for loop runs a number of times you already know. A while loop keeps going as long as a condition stays True — and you may not know how many times that will be. Same four parts every time: the keyword, the condition, the colon, and an indented body.

count = 0 # set up before the loop while count < 5: # header: condition, then colon painter.circle(50) # body, indented painter.right(72) count = count + 1 # INCREMENT. forget this and it never ends

Trace it yourself

Each click is one trip through the loop. Watch the condition get checked before the body runs, every single time.

countcount < 5body runs?count after

What the turtle draws

Five circles, 72° apart. Five times 72 is 360 — the same rule you used on the flower.

College Board connection, and it is backwards. The exam writes REPEAT UNTIL (condition), which keeps going until the condition becomes True. A Python while keeps going while the condition is True and stops when it turns False. Same idea, inverted condition. Translating one to the other means flipping it.

3 · Infinite loop

An infinite loop is a loop whose condition never becomes False. It does not crash. It does not error. It just runs forever, and you have to kill the program yourself. Here is PLTW's example:

line = 0 while line % 2 != 2: painter.forward(50) line = line + 1

The increment is there, so what went wrong? line % 2 is a remainder after dividing by 2, so it can only ever be 0 or 1. It can never equal 2. So != 2 is True forever. The loop was doomed by the condition, not by a missing line.

Ctrl + C in the terminal stops a runaway program in VS Code. Learn it now, because you will need it in 1.1.4. In Replit, press the Stop button.

4 · Zero-iteration condition

The opposite failure. A zero-iteration condition is false the very first time it is checked, so the body never runs even once. No error, no output, and students stare at a blank screen thinking the program broke.

count = 10 while count < 5: # 10 < 5 is False immediately painter.circle(20) # never runs. not once. count = count + 1

Both failures come from the same place: the relationship between where the counter starts and what the condition asks. Check that relationship before you run, every time.

5 · Nested loop

A nested loop is a loop inside another loop. Every single time the outer loop goes around once, the inner loop runs all the way to completion.

for i in range(10): # outer: 10 times for j in range(1, 6): # inner: 5 times, for EACH i print(j) # 10 x 5 = 50 lines of output

So j prints 1 through 5, and it does that ten times over. Multiply the loops to get the total: ten times five is fifty. This is how a few lines of code draws a thousand-line spirograph.

6 · Operator precedence

Operator precedence is the fixed order Python evaluates arithmetic in. Parentheses first, then exponents, then multiply / divide / modulo, then add / subtract.

The part people get wrong. Multiply, divide and modulo are the same precedence as each other, so they go strictly left to right. Same for add and subtract. There is no secret rule that multiplication beats division.

Watch it resolve

Pick one.

Same numbers. Different answers.

Those two expressions use the same digits in nearly the same order and land on 24 and 0. One % changed everything, because it sits in the same precedence tier as * and / and just took its turn in line.

The dot operator — the . in painter.right(5) — resolves after parentheses but before any of the math operators. And parentheses always win, so use them when you want to be certain.

7 · Flowcharts: algorithms without code

You can write an algorithm with no programming language at all. A flowchart uses an oval for begin and end, a rectangle for a command, and a diamond for a decision. A linear algorithm has one path start to finish; a conditional one branches on a True/False question.

Begin
↓
count = 0
↓
count < 5 ?
↓ True
draw circle · turn 72° · count = count + 1
↶ back up to the decision
End  (when the decision is False)

That diamond is the loop condition, and the arrow going back up is the iteration. A while loop is this picture.

8 · Decidable or undecidable

A decidable problem is one you can write an algorithm for that gives a correct answer for every possible input. "Is this number even?" is decidable — num % 2 == 0 settles it, always.

An undecidable problem is one where no algorithm can always give a correct yes-or-no answer. Some individual cases may be solvable; there is just no single algorithm that handles all of them. The classic example is the one you just met: given a program and an unknown input, will it ever stop running? If the input comes from a user you do not know, you cannot decide it in advance.

This is the first idea in this course that is not about getting better at coding. It is a limit on what computing can do at all — and it is on the AP exam.

Check your predictions

Ungraded. This only shows you which of your eight guesses landed.

Scored checks

Section 6 • 28 points

Launch Check

Seven questions, four points each. Pass this and you are ready to open 1.1.4 and start building a spirograph. One shot per question, and a wrong answer tells you what to go re-read.