Loop Navigator Reference Loop Navigator Reference
Your decision guide for repeating actions in Python
Student:
Date:
Step 1: Choose Your Loop
Do you know exactly how many times you need to repeat?
Yes
FOR Loop
Example: "Repeat 5 times" or "Repeat for every item in a list."
No
WHILE Loop
Example: "Repeat until the user says stop" or "Until a score is reached."
Step 2: Build the Syntax
The "For" Loop Blueprint
for item in range(5):
print("Repeating...")
Iterator (Variable name)
Sequence (How many times)
Indented Body (What to do)
The "While" Loop Blueprint
while score < 10:
print("Playing!")
score = score + 1
Condition (The Rule)
Update Step (Prevents Infinite Loops)
Memory Hacks
The Colon Rule: Every loop line ends with a :. It's like a doorway!
The Tab Rule: Python only repeats lines that are pushed to the right (indented).
The "Endless" Trap: If a while condition never becomes False, the loop runs forever! Use Ctrl + C to stop it.
Loop Lab Experiments Loop Lab Experiments
Predict, Change, and Observe: Seeing Cause & Effect
Scientist:
EXP #01
The Range Shifter (For Loop)
1. Run this code exactly as written:
for i in range(3):
print("Hello!")
My Output Result:
2. Now change range(3) to range(7). Predict:
Observation Task:
"How many times did the word print now?"
"What happens if you use range(0)?"
EXP #02
The Score Breaker (While Loop)
1. Run this code:
score = 0
while score < 4:
print("Point!")
score = score + 1
My Output Result:
2. CHALLENGE: Change the score < 4 to score < 1.
Observation Task:
"Does it print more points or fewer points?"
"What happens if you remove the score = score + 1 line?"
Lab Reflections
In my own words, changing the variable inside the loop makes the loop...
One thing I noticed about "While" loops today was...
Loop Lingo Cards Loop Lingo Cards
Vocabulary match & flashcards for memory support
UNIT: Python Loops 1.0
How to Use
1. Cut out the Term (bold) and Definition cards.
2. Match the term to its meaning.
3. Use these cards as a quick desk reference while you code!
Iteration
"One complete cycle of the loop. Like one lap around a track."
Iterable
"A collection of items you can loop over (like a list or a range)."
Condition
"The rule that tells a 'while' loop to keep running or stop."
Infinite Loop
"A loop that never stops because the condition stays True forever!"
Indentation
"The empty space (tab) before code that belongs inside a loop."
Loop Variable
"The 'placeholder' (like 'i') that changes every time the loop runs."
Pro-Tip: Fold the paper in half and glue it if you want to make double-sided flashcards!
Loop Logic Worksheet Loop Logic Lab
Mastering Repetition through Action
Coder:
Date:
Task 1: The Decision
Read each scenario. Circle the loop type that fits best (use your Navigator Reference if you need help!).
"I want to print the word 'Jump!' exactly 10 times."
For Loop
While Loop
"Keep asking for a password until the user gets it right."
For Loop
While Loop
Task 2: Triple Threat
Write three simple loops that all print "Python!" twice. This helps build muscle memory!
Example 1: Using a For Loop with range
Example 2: Using a For Loop with a List [1, 2]
Example 3: Using a While Loop and a counter
Infinity Check!
One of these loops will never stop. Circle the "Broken" one!
# Option A
x = 0
while x < 5:
print("Hi")
x = x + 1
# Option B
x = 0
while x < 5:
print("Hi")
# (forgot to update x!)
Loop Logic Slides Loop Logic Lab
Mastering Python Repetition
Memory Support
Visual Logic
Why Use Loops?
Instead of writing the same code over and over...
print("Lather")
print("Rinse")
print("Lather")
print("Rinse")
...
A loop does the work for you!
Saves time. Fewer mistakes.
Which Loop to Use?
Do you know how many times it repeats?
YES
FOR
"Repeat 5 times"
NO
WHILE
"Repeat until..."
Anatomy: For Loop
for item in range(5):
print("Hello!")
The "Placeholder"
The "Limit"
The "Action"
Anatomy: While Loop
while score < 10:
# Do something
score = score + 1
The "Rule" (Condition)
The "Counter" (Prevents Infinite)
Danger Zone!
Infinite loops happen when a while condition
stays TRUE forever.
EMERGENCY STOP: Ctrl + C
Time to Experiment
Loop Lab
Run the code and change the numbers to see what happens!
Logic Sheet
Test your brain with scenarios and selection tasks.
Grab your Navigator Reference and let's go!
Loop Facilitation Guide Facilitation Guide
Supporting Processing & Memory in Loop Logic
TEACHER REFERENCE
Memory Strategies
Anchor Everything:
Always have the Loop Navigator Reference visible. Don't ask the student to recall syntax from memory; focus on their ability to find and apply it.
Verbal Memory Check:
Have the student read their code aloud. Hearing the "logic" can help catch missing colons or indentation that the eyes might skip over.
Color Consistency:
Encourage using highlighters on the printed code to match the colors on the Syntax Blueprint (e.g., orange for variables, purple for keywords).
Processing Support
The "One Change" Rule:
During the Loop Lab Experiments , ensure the student only makes one change at a time. Changing multiple variables complicates the cause-and-effect relationship.
Decision Scaffolding:
If the student hesitates on loop selection, point to the Decision Tree . Ask: "Do we know how many times?" instead of "Which loop do you need?"
Wait Time:
Allow at least 15 seconds after asking a logic question. Students with processing challenges need time to navigate the mental map of the loop.
Lesson Flow
1
Visual Hook (Slides 1-2)
Use real-world loops (e.g., the chorus of a song) to establish the concept before looking at code.
2
Guided Selection (Slides 3-5)
Review the For and While blueprints. Distribute the Loop Navigator Reference here.
3
Lab & Logic (Worksheets)
Students work on the Experiments sheet first (doing/seeing), then the Logic Worksheet (thinking/choosing).
Common Stumbling Blocks
Off-by-one Errors:
Students often expect range(5) to count up to 5. Clarify that it produces 5 numbers, but stops before 5 (0, 1, 2, 3, 4).
The Colon/Tab Ghost:
Students may forget the colon or indentation. Use the "Doorway" analogy: The colon is the door; everything inside the loop must be inside the door (tabbed over).
Loop Logic Answer Key Loop Logic Answer Key
Teacher Reference & Scoring Guide
Confidential
Material: Loop Logic Worksheet
Task 1: The Decision
Scenario A (10 times): For Loop
Scenario B (Password until right): While Loop
Task 2: Triple Threat (Expected Logic)
# For + Range
for i in range(2):
print("Python!")
# For + List
for x in [1, 2]:
print("Python!")
# While + Counter
c = 0
while c < 2:
print("Python!")
c = c + 1
Task 3: Infinity Check
Correct Answer: Option B is the broken loop because the variable x is never increased, so the condition x < 5 stays True forever.
Material: Loop Lab Experiments
Exp 1: Range Shifter
range(3): Prints 3 times.
range(7): Prints 7 times.
range(0): Prints 0 times (loop never starts).
Exp 2: Score Breaker
score < 4: Prints 4 times (0, 1, 2, 3).
score < 1: Prints 1 time (only for 0).
Removing update: Creates an infinite loop.
Material: Loop Lingo Match
Iteration "One complete cycle..."
Iterable "A collection of items..."
Condition "The rule that tells..."
Infinite Loop "A loop that never stops..."
Indentation "The empty space (tab)..."
Loop Variable "The 'placeholder' (i)..."
Loop Logic Cheat Sheet Plus Loop Logic Cheat Sheet
Python Repetition Mastery
Extended Version
FOR Loop
Exact repetition (Counting or Lists).
Example A: Counting with Range
for i in range(3):
print("Count")
Repeats exactly 3 times.
Example B: Looping a List
for fruit in ["App", "Ban"]:
print(fruit)
Repeats for every item in the list.
WHILE Loop
Until a condition becomes FALSE.
Example A: The Score Counter
while score < 5:
# code here
score += 1
Stops when score hits 5.
Example B: User Input Loop
while msg != "stop":
msg = input("?")
Repeats until user types "stop".
Rules for Success
The Colon Rule
End with :. It tells Python code is coming next!
The Tab Rule
Indented code (pushed right) is what actually repeats.
Emergency Stop
Stuck in an infinite loop? Mash Ctrl + C to kill the script.
Memory Tip: "For" is for counting. "While" is until stopping.