Python Blocks Cheat Sheet Python Quick Lookup
The All-in-One Desk Reference
Symbol Guide
[ ] Lists (Bags)
( ) Tuples (Locked)
{ } Dicts & Sets
: "Then..." (Indent)
" " Text / String
Math & Rules
==
Equal?
!=
Not Equal?
>
Greater
<
Less
*
Multiply
/
Divide
Structure Templates
If / Else
if rule: runs_if_true else: runs_if_false
For Loop
for item in group: do_this_every_time
Function
def my_tool(): instructions return result
Data Types
String
Integer
Boolean
Float
The Indent Rule
:
"If you see a Colon , you MUST push the next line in (Tab)!"
Desk Reference • Level 1
Visual Python Foundations
Python Logic Guide Python Logic Guide
Step-by-Step: Making Decisions
Lesson 1.2
1
Ask a Question (The IF)
Coding starts with a question. Python looks for a True or False answer.
Plain English
"If my score is more than 50..."
ANNOTATION
if score > 50:
Keyword
Don't forget!
2
Make the Step (The Indent)
The code inside your "If" must be pushed to the right . This is called an Indent .
Press TAB or 4 SPACES
if score > 50:
print("You Win!")
3
The Backup Plan (The ELSE)
If the question is False , Python skips the first part and goes to Else .
IS IT TRUE?
YES
Run IF code
NO
Run ELSE code
if lives == 0:
print("Game Over")
else:
print("Keep Playing")
Purple words are Python's "keywords"
Numbers don't need quotes
Mental Check:
Can you find the IF, the Indent, and the Colon : in the code above?
Python Vocabulary Cards Variable
A named box that holds data
score = 10
String
Text inside "quotes"
"Hello World"
Integer
A whole number
50
Indent
The space at the start of a line
print("Hi")
Boolean
True or False
True / False
Syntax
The rules for writing code
if score == 10:
Cut these cards out to use as quick-look references while coding!
Python Rules Handout Python Rules
The Quick-Look Handout
1
Text vs. Numbers
2
Variable Names
DO THIS:
Use letters and underscores
DON'T DO THIS:
player 1 (no spaces!)
1stPlace (no starts with numbers)
3
The "Helper" Symbols
:
COLON
After if / else
( )
BRACKETS
Around print messages
INDENT
Press Tab once
4
When do I use IF?
"If you have to make a choice or check a rule , use IF / ELSE."
Checking scores
Checking passwords
Logic Lab Examples Logic Lab
Finding the "IF" in Real Life
Name:
Date:
Video Game
Win
Is the score over 100?
if score > 100:
print("You win!")
else:
print("Try again")
The Magic
Door
Do you have the key?
if has_key == True:
print("Door Opens")
else:
print("It is locked")
Phone
Alert
Is battery less than 10?
if battery < 10:
print("Charge now!")
else:
print("Keep playing")
Time for
Bed
Is the hour 8 or more?
if hour >= 8:
print("Go to sleep")
else:
print("Stay up")
Python looks at the variable name first!
Logic Lab Scenarios - Page 1
Logic Lab
Part 2: More Coding Scenarios
Logic Practice Continued
Buying
Candy
Is money more than 5?
if money >= 5:
print("Buy candy")
else:
print("Need more cash")
Hot Day
Check
Is temp more than 30?
if temp > 30:
print("Wear shorts")
else:
print("Wear pants")
Secret
Login
Is the pass "Magic"?
if password == "Magic":
print("Welcome!")
else:
print("Wrong code")
Weekend
Sleep-in
Is day "Saturday"?
if day == "Saturday":
print("Sleep in!")
else:
print("Wake up early")
Logic scenarios help you know when to use IF.
Logic Lab Scenarios - Page 2
Collection Blocks Cheat Sheet Python Collections
Groups of Data (Dictionaries, Tuples, Sets)
Reference Guide
Dictionaries
"Key" and "Value" pairs
Think of a Dictionary like a Locker . You use a Key to get what's inside (the Value ).
Key
Value
"Pikachu"
# Use Curly Braces { }
player = {
"name": "Sam",
"lvl": 10
}
Tuples
"The Locked List"
A list that cannot be changed . Once you lock it, it stays that way!
(
10
20
)
pos = (10, 20)
Sets
"The Unique Bag"
A collection where everything is unique . No duplicates allowed!
🍎
1
🍎
X
items = {"apple"}
{ }
Dictionary
( )
Tuple
{ }
Set
Collection Scenarios Examples Collection Lab
When to Use Dictionaries, Tuples, and Sets
Name:
Player
Profile
Dictionary
Use for Labels . "What is the player's level? What is their health?"
hero = {
"name": "Zelda",
"hearts": 3,
"stamina": 100
}
Map
Location
Tuple
Use for things that never change . "Where is the North Pole?"
location = (40.71, -74.00)
# You can't change these numbers!
Unique
IDs
Set
Use to remove doubles . "Which unique students are here today?"
students = {"Alex", "Sam", "Alex"}
# Python turns this into:
{"Alex", "Sam"}
Spanish
Words
Dictionary
Use to translate . Look up a word to find its meaning.
words = {
"hola": "hello",
"adios": "goodbye"
}
Ask: Do I need a label? Do I want it locked? Do I want no doubles?
Collection Scenarios Sheet
Logic Practice Worksheet Logic Practice
Write your own If / Else code!
Name:
Read the scenario, then write the Python code. Remember to Indent the print lines and use a Colon : after if and else!
1. Scenario: Is the coffee hot?
Check if temp is more than 50. If yes, print "Too hot". Else, print "Drink it".
IF ... : TAB + PRINT ELSE:
if
else:
2. Scenario: Is the light on?
Check if light is equal to True. If yes, print "Bright". Else, print "Dark".
== TRUE : ( "MESSAGE" )
if
else:
3. Create your own!
Pick a scenario (like score or weather) and write the whole code block below.
Collections Practice Worksheet Collection Practice
Building Dictionaries, Tuples, and Sets
Name:
Choose the right "container" for each job. Remember your symbols:
{ } for Dictionaries & Sets | ( ) for Tuples
1. Create a Robot Profile
Make a Dictionary named bot. Give it a "name" of "Robby" and a "battery" level of 100.
{ KEY : VALUE }
bot = {
}
2. Lock the Map Spot
Make a Tuple named spot for the numbers 5 and 12. These numbers can't be changed!
( PARENTHESES )
spot =
3. The Unique Toy Bag
Make a Set named toys. Add "car" and "ball". If you add "ball" twice, Python will ignore the second one!
{ CURLY BRACES }
toys =
Check your Collection Cheat Sheet if you forget which bracket to use!
Logic Practice Answer Key ANSWER KEY
Logic Practice Worksheet Solutions
TEACHER REFERENCE
1. Scenario: Is the coffee hot?
if temp > 50:
print("Too hot")
else:
print("Drink it")
2. Scenario: Is the light on?
if light == True:
print("Bright")
else:
print("Dark")
3. Sample Solution for Free Choice
# Scoring scenario
if score > 10:
print("Great job!")
else:
print("Keep going")
Ensure student indents (TAB) and uses colons correctly.
Collections Practice Answer Key ANSWER KEY
Collection Practice Worksheet Solutions
TEACHER REFERENCE
1. Robot Profile (Dictionary)
bot = {
"name": "Robby",
"battery": 100
}
2. Map Spot (Tuple)
spot = (5, 12)
3. Unique Toy Bag (Set)
toys = {"car", "ball"}
Dictionary: { Key : Value } | Tuple: ( Val, Val ) | Set: { Val, Val }
Syntax Detective Worksheet Syntax Detective
Find the bugs and fix the code!
Name:
The code below has bugs (errors). Look for missing Quotes " ", missing Colons :, and bad Indents. Fix them in the boxes!
Broken Code
name = Sam
Hint: Sam is text. Text needs something around it!
Fix it here
Broken Code
if score > 10
print("Win")
Hint: Look at the end of the first line. What is missing?
Fix it here
if score > 10
Broken Code
if ready == True:
print("Go!")
Hint: The second line should be pushed to the right!
Fix it here
if ready == True:
Broken Code
player 1 = "Alex"
Hint: No spaces allowed in names! Use an underscore _ instead.
Fix it here
Syntax Detective - Case File 1
Syntax Detective
Advanced Case Files
Broken Code
if lives = 0:
Hint: Comparing needs TWO equal signs. == instead of =.
Fix it here
Broken Code
If score > 50:
Hint: Python needs 'if' to be lowercase. 'If' is a bug!
Fix it here
Broken Code
if hp == 0:
printt("Game Over")
Hint: Look at how 'print' is spelled. Is there an extra letter?
Fix it here
if hp == 0:
Broken Code
print "Hello"
Hint: Python needs brackets ( ) around what you want to print.
Fix it here
Syntax Detective - Case File 2
Syntax Detective Answer Key ANSWER KEY
Syntax Detective Solutions
TEACHER REFERENCE
1
Missing Quotes
name = "Sam"
2
Missing Colon
if score > 10:
print("Win")
3
Indent Error
if ready == True:
print("Go!")
4
Variable Name
player_1 = "Alex"
5
Comparison (==)
if lives == 0:
6
Case Sensitivity
if score > 50:
7
Spelling Error
if hp == 0:
print("Game Over")
8
Missing Brackets
print("Hello")
Remind students: Python is very picky about symbols and spaces!
Data Types Poster Data Types
What's inside the box?
String
Anything with "Quotes" is text.
"Hello"
"123"
Text • Names • Words
Integer
Whole numbers with No Quotes .
10
5000
Counting • Scores • Age
Boolean
Only True or False .
True
False
Switches • Logic • Checks
Float
Numbers with a Decimal .
10.5
0.99
Money • Accuracy • Partial
Rule: Python treats "10" (Text) and 10 (Number) differently!
Logic Path Poster The Logic Path
How Python Makes Decisions
if score > 10:
IS IT TRUE?
Checking the rule...
YES
Run indented code
NO
Skip to ELSE
print("Success!")
The computer runs the indented block.
else:
print("Retry")
Python jumps over the 'if' block to the 'else'.
Think of it like a Fork in the Road . You can only go one way!
Comparison Operators Poster Comparison Rules
How to Compare Things in Python
==
Equal To
Checks if two things are exactly the same.
10
==
10
!=
Not Equal
Checks if two things are different .
10
!=
5
>
Greater Than
The number on the left is bigger.
100 > 50
<
Less Than
The number on the left is smaller.
5 < 100
The Golden Rule of "="
Use ONE equals = to SET a variable.
Use TWO equals == to CHECK if things are equal.
Comparison Operators Poster • Lesson 1.3
Symbol Map Poster The Symbol Map
Which Punctuation do I use?
( )
Parentheses
PRINT: print("Hi")
TUPLE: (1, 2, 3)
[ ]
Square Brackets
LISTS: [item1, item2]
INDEX: hero[0]
{ }
Curly Braces
DICT: {"key": "val"}
SETS: {"a", "b"}
:
"
Colons & Quotes
COLON: if ready:
QUOTES: "Hello"
Functions
Simple Lists
Tagged Groups
Variable Anatomy Poster Variable Anatomy
How to build a line of code
score
Name
=
Sets to
10
Value
Good Names
player_one Clear and simple
score Short and sweet
Bad Names
player 1 No spaces!
1score No numbers first!
Variable Foundations Poster • Reference Sheet
List Blocks Cheat Sheet List Blocks
The Simple Grocery Bag
What is a List?
Think of a List like a Grocery Bag . You can put many items inside, and you can change them whenever you want!
"Use Square Brackets [ ]"
Python Code
items = [
"Apple",
"Milk",
"Bread"
]
Add Items
Put something new in the bag.
bag.append("Cookie")
Remove Items
Take something out of the bag.
bag.remove("Milk")
Position
Python starts counting at 0 .
bag[0]
List Foundations Cheat Sheet • Reference
Math Blocks Poster Math Blocks
Calculations in Python
Plus
Adds numbers together.
5 + 5 = 10
-
Minus
Takes away numbers.
10 - 3 = 7
*
Times
Multiplies (The Asterisk).
4 * 2 = 8
/
Divide
Divides (The Slash).
10 / 2 = 5.0
Variable Math
You can do math with variables too!
new_score = score + 10
Python Math Poster • Reference Sheet
Dictionary Anatomy Poster Dictionary Anatomy
The Label & Value System
{
"name"
Key
:
"Pikachu"
Value
}
The Locker
The Key is the name on the locker.
The Value is what is hidden inside!
Looking it up
Ask for the Key to get the Value .
print(player["name"])
Every key must be unique!
Values can be anything
Dictionary Reference Poster • Collection Series
Block Anatomy Poster Block Anatomy
How the pieces fit together
if score > 50:
Keyword
Comparison
The Trigger
print("Win!")
The "Safe" Zone
else:
The Backup Plan
print("Try")
Colons are REQUIRED!
Indents show "Belonging"
Keywords
Special Python words (if, else, print).
Colons
Think of them as "Then..." symbols.
Indents
Lines that only run if the rule is met.
Logic Block Anatomy Poster • Foundations 1.4
Loop Blocks Cheat Sheet Loop Blocks
Repeating Code the Easy Way
For Loop
Use this to do something for every item in a group.
Like checking every item on a grocery list.
for item in bag:
print(item)
The Rule
The Repeat Action
While Loop
Use this to keep going until a condition is False.
Like charging until the battery is 100.
while battery < 100:
print("Charging...")
Warning: Don't forget to change the variable or it loops forever!
Indent
Repeat code must be pushed right.
Colon
Loops always need a : at the end.
Empty
If the group is empty, nothing loops.
Loop Blocks Cheat Sheet • Foundations Reference
Loop Anatomy Poster Loop Anatomy
How to build a repeating machine
for item in list:
Keyword
Current Item
The Group
print(item)
Repeats for every item
The Cycle
1
Python grabs the first thing in the list.
2
It runs the indented code with that thing.
3
It goes back up and grabs the next thing.
The Stop
When the list is empty , the machine stops and moves to the next line of code below the indent.
"No more items? No more looping!"
Loop Anatomy Poster • Foundations 1.5
Loop Scenarios Examples Loop Lab
Repeating Actions in Real Life
Name:
Checking
Your Bag
For Loop
Use a FOR loop to look at every item in your bag.
for item in backpack:
print(item)
Music
Player
For Loop
Play every song in the album until you reach the end.
for song in album:
play(song)
Game
Loading
While Loop
Keep loading while the progress is less than 100 .
while progress < 100:
print("Still Loading...")
Alarm
Clock
While Loop
Keep buzzing while the person is still asleep .
while is_asleep == True:
print("BEEP! BEEP!")
Ask: Do I have a list of things (FOR) or am I waiting for something to change (WHILE)?
Loop Scenarios Reference
Code Doctor Checklist Code Doctor
Fixing Errors Step-by-Step
1. Look for Red Lines
The computer puts a Red Line under the mistake. Fix that line first!
print("Hi"_
2. Check the Quotes
Does every bit of Text have TWO quotes? " "
"Hello"
3. Find the Colons
Did you put a Colon : after your if, else, or for?
if ready:
4. Push the Indents
Is the code inside a loop or if-statement pushed to the right? Press TAB .
5. The Double Equals
Are you checking a rule? Use Two equals! ==
score == 10
Last Resort: The Spelling Bee!
Check the spelling of your variable names. Score and score are different to Python!
Code Doctor Checklist • Troubleshooting Guide
Function Blocks Cheat Sheet Function Blocks
The Magic Machines of Code
The Robot Chef
A Function is a set of instructions you can use over and over .
"Put ingredients in, get a result out!"
def make_toast(bread):
# The instructions go here
return "Toast!"
Define the machine
The Ingredient
Press the Button
Writing the instructions doesn't run the code. You have to Call it to make it work.
"Tell the machine to start!"
make_toast("Bread")
This runs the code above!
Parameters
The ingredients you put in brackets.
Return
The final result the function gives back.
Naming
Give it a verb like "say_hello" or "jump".
Function Blocks Cheat Sheet • Foundations Reference
Function Anatomy Poster Function Anatomy
How to build a custom tool
def greet(name):
Define
The Tool Name
The Input
print("Hello")
return "Done!"
Code inside is indented
Gives a result back
The Setup
Think of def like Building a Machine . You are telling Python how the tool works, but the machine is not "ON" yet.
The Call
To use the machine, you Call its name outside the indent.
greet("Sam")
Function Anatomy Poster • Foundations 1.6
Data Type Matcher Worksheet Data Sorter
Identify the Data Types
Name:
Look at the code in each box. Draw a line to the correct Data Type or write the name in the blank!
"Game Over"
Type Here
500
Type Here
True
Type Here
12.50
Type Here
"75"
Type Here
False
Type Here
The Word Bank
String
Integer
Boolean
Float
Data Type Matcher Worksheet • Foundations 1.1
Code Flow Poster Code Flow
How Python reads your code
The Waterfall
Python reads code just like you read a book: Top to Bottom and Left to Right .
"First line first, last line last!"
1 name = "Sam"
2 print(name)
3 score = 10
if score > 10:
# Python Skips this!
else:
print("Try again")
The Jump
Sometimes Python jumps over code! If an "if" rule is False, Python jumps to the else section.
"Leap over the blocks you don't need!"
The Cycle
A loop makes Python go Back to the Top . It repeats until the list is empty or the rule is False.
"Round and round until we're done!"
for item in bag:
print(item)
Code Flow Foundations Poster • Reference Sheet
String Power Poster String Power
Joining Text Together
1. The Glue (+)
"Hello"
"World"
"HelloWorld"
Warning: Python doesn't add a space! You must add " " yourself.
2. The F-String (f"")
"Drop a variable right into the text using curly braces!"
name = "Sam"
print(f"Hello {name}")
Format
The variable goes here
Easier to Read!
String Manipulation Poster • Foundations 1.7
Python Toolbox Poster The Python Toolbox
Which tool do I need for the job?
Variable
"I need to store one piece of info (like a name or score)."
If / Else
"I need to make a choice or check a rule."
Lists
"I need to store a group of items in order."
Dictionary
"I need to label my info (like 'name' and 'age')."
Loops
"I need to repeat the same action many times."
Functions
"I need to build my own custom tool to use later."
Remember:
"If you want to Store it, use a variable or collection."
"If you want to DO something, use logic, loops, or functions."
Toolbox Selection Poster • Python Foundations Final
Computer Talk Poster Computer Talk
How to talk to your code
1. PRINT (The Speaker)
Use print when you want the computer to speak to you or show information on the screen.
"Output: The computer sends info OUT."
print("Hello!")
Hello!
2. INPUT (The Ear)
Use input when the computer needs to listen to the user and wait for a typed answer.
"Input: You send info IN to the computer."
name = input("Who are you?")
Who are you?
The computer stops and waits here!
Input & Output Poster • Foundations Reference
Logical Links Poster Logic Links
Joining Multiple Rules Together
AND
The Strict Link
Both Must Be True
Python only runs the code if EVERY rule is True.
True
True
RUNS!
if score > 10 and time > 0:
OR
The Easy Link
Only One Needs to Be True
Python runs the code if at least ONE rule is True.
True
/
False
RUNS!
if key == "Blue" or key == "Gold":
NOT
The Opposite
The Flip
Python looks for the Opposite . It turns True into False.
Input
Opposite
if not game_over:
Logical Operators Poster • Foundations 1.8
List Anatomy Poster List Anatomy
How to build a group of items
[
"Apple"
Index 0
,
"Milk"
Index 1
,
"Eggs"
Index 2
]
Square Brackets
Commas separate items
The Zero Rule
Computers start counting at 0 .
The 1st item is at position 0 .
bag[0] # Gets Apple
Mix and Match
You can put strings, numbers, and booleans in the same list !
mixed = ["Sam", 10, True]
List Anatomy Poster • Foundations 1.9
Tuple vs Set Poster The Showdown
Tuple vs. Set: What's the difference?
VS
The Tuple
( )
ORDER MATTERS
DOUBLES ALLOWED
Permanent / Locked
point = (10, 10, 20)
"Good for dates, map points, and fixed rules."
The Set
{ }
Random Order
NO DOUBLES
Can add or remove
items = {"ID1", "ID2"}
"Good for IDs, unique tags, and cleaning lists."
"Tuples are Fixed & Ordered . Sets are Unique & Random ."
Tuple vs Set Comparison Sheet Which Container?
Choosing between Tuple and Set
The Map Spot
"It never moves!"
pos = (5, 10)
TUPLE WINS
Unique Gems
"No doubles allowed!"
gems = {"Ruby", "Jade"}
SET WINS
Your Birthday
"Fixed numbers in order."
born = (2015, 5, 20)
TUPLE WINS
Active Users
"Check if name is in set."
online = {"Alex", "Sam"}
SET WINS
Feature Tuple ( ) Set { } Changeable? NO (Locked) YES Doubles Allowed? YES NO Keep Order? YES NO (Random)
Tuple vs Set Comparison Sheet • Foundations 2.0
Container Lab Comparison Sheet The Container Lab
Action vs. Reaction: Tuple vs. Set
Action: Change a Value
pos = (5, 10)
pos[0] = 7
ERROR!
"You can't change a locked Tuple!"
# Sets don't have indexes!
# Use .remove() and .add()
SUCCESS!
"Just remove the old and add the new."
Action: Add a Double
nums = (1, 1, 2)
1
1
2
"Tuples keep everything!"
nums = {1, 1, 2}
1
1
2
"Sets delete the double automatically!"
Quick Choice Guide
Choose TUPLE if:
It's a fixed rule (like RGB colors).
Order matters (like a date Y-M-D).
You never want to change it.
Choose SET if:
You want to remove doubles.
You just need to check if an item is there.
The order doesn't matter at all.
Container Lab: Tuple vs Set Reactions • Foundations 2.1
Indentation Rule Poster The Indent Rule
When to "Step In" and when to "Stay Left"
:
The Colon Trigger
If a line ends with a Colon : , the NEXT line must be pushed in!
Step In (Indent)
"This code belongs to the line above."
if score > 10:
print("Win")
for item in bag:
print(item)
Press TAB once
Stay Left (No Indent)
"Simple lines and groups stay at the wall."
score = 10
name = "Sam"
pos = (5, 10, 15)
bag = ["Apple", "Milk"]
print("Hello!")
Keep against the wall
Indentation Rule Poster • Python Foundation Visuals
Study Session Roadmap Guide Study Session
1-Hour Group Roadmap
Timer 60:00
Before you start: Grab these Posters
Variable Anatomy
Block Anatomy
Loop Anatomy
Indent Rule
Code Doctor
Python Toolbox
10m Warm Up
Symbol Flash Recall
Use the Vocabulary Cards . One person shows the icon, the group shouts the name (Variable! String! Boolean!) and what symbol it uses.
15m Logic Lab
Scenario Team Solve
Open the Logic Lab Examples . Read a scenario (like "Video Game Win"). Every person takes a turn explaining WHY we used an "if" or "else" for that job.
20m The Sprints
Syntax Detective Relay
Work on the Syntax Detective Worksheet . If you get stuck, the team uses the Code Doctor Checklist to find the "Check Step" (Step 2: Quotes? Step 3: Colons?).
15m Final Pull
The Toolbox Challenge
One person names a task (e.g., "I want to save my top 10 scores"). The others point to the correct tool on the Python Toolbox Poster and explain why.
No "Bugs" Left Behind: Help your teammates!
Use your posters!
Study Session Facilitator Prompts Facilitator Prompts
Part 1: Symbols, Data & Logic
1. Symbol Flash Recall (10m)
Text
"What do we wrap around text strings?"
Quotes " "
Trigger
"What symbol triggers an indent?"
Colon :
Locked
"What brackets are for a Tuple?"
Parentheses ( )
Bag
"What brackets are for a List?"
Square Brackets [ ]
Equality
"How do we check if two things are SAME?"
Double Equals ==
Different
"How do we check if things are NOT SAME?"
Not Equal !=
Math
"What is the symbol for Multiplication?"
Asterisk *
Math
"What is the symbol for Division?"
Slash /
2. Scenario Team Solve (15m)
"If your money is more than 5, buy candy. Else, wait."
if money > 5:
"Checking if the user's name is 'Admin'."
if name == "Admin":
"If it's Saturday or Sunday, sleep in!"
if day == "Sat" or day == "Sun":
"Check if the temperature is 30 or exactly 30."
if temp >= 30:
"Check if the lives are NOT equal to zero."
if lives != 0:
"We need BOTH the key AND the level 5 to pass."
if key and lvl >= 5:
Study Group Facilitator Guide • Page 1 of 2
Facilitator Prompts
Part 2: Bugs, Tools & Collections
3. Syntax Detective Relay (20m)
if score > 10 Add Colon :
name = Alex Add Quotes " "
If ready: Lower-case 'if'
print "Hi" Needs Brackets ( )
player 1 = "X" No Space player_1
if lvl = 5: Needs Double ==
1score = 10 Letter First score1
printt("Hi") Spelling 'print'
"Hello' Match Quotes " "
if True print("Hi") Missing Colon & Indent
4. Toolbox Challenge (15m)
"I want to save my birthday Year, Month, Day forever."
Tool: TUPLE
"I want to remove duplicate emails from a list."
Python Foundations Quiz Worksheet Foundations Quiz
Show what you know about Python!
Name:
Date:
1
Match the Symbol
Draw a line to the correct name.
" "
:
( )
Colon
Brackets
Quotes
2
Circle the STRING
Which one is text?
100
"Hello"
True
3
Find the Bug
Which code is CORRECTLY indented?
if score == 10:
print("Win")
Option A
if score == 10:
print("Win")
Option B
4
Choosing Tools
"I want to make a choice: if it is cold, I wear a jacket."
Variable
If / Else
Loop
Python Foundations Final Quiz • Level 1
Quiz Answer Key ANSWER KEY
Foundations Quiz Solutions
TEACHER REFERENCE
1
Match the Symbol
" " Quotes
: Colon
( ) Brackets
2
The String
"Hello"
Always look for quotes!
3
Correct Indent
if score == 10:
print("Win")
Correct Option B
4
Tool Choice
If / Else
"Deciding which jacket to wear based on the cold."
Python Foundations Quiz Answer Key • Final Toolkit Item
Collections Foundations Quiz Collection Quiz
Mastering Dictionaries, Tuples, and Sets
Name:
Date:
1
Match the Brackets
Draw a line to connect the symbol to the correct name.
( )
{ "k": "v" }
{ 1, 2, 3 }
Tuple
Set
Dictionary
2
Who am I?
Choose the correct collection name for each rule.
"I am locked and can NEVER be changed."
Set
Tuple
"I delete all doubles. Everything inside me is unique."
Set
Dictionary
"I use labels (Keys) to store my information."
Tuple
Dictionary
3
Task Check
Circle the best tool for the job.
"I want to save my home's Latitude and Longitude numbers forever."
TUPLE
"I want to save a list of items and their prices (Apple: 1.00)."
DICTIONARY
Collections Quiz • Dictionaries, Tuples, & Sets
Collections Quiz Answer Key ANSWER KEY
Collections Quiz Solutions
TEACHER REFERENCE
1
Match the Brackets
( ) Tuple
{ "k": "v" } Dictionary
{ 1, 2, 3 } Set
2
Who am I?
Rule: Locked / Permanent
Tuple
Rule: Unique / No Doubles
Set
Rule: Key / Value Labels
Dictionary
3
Task Check
Latitude / Longitude
TUPLE
Why: Numbers are fixed and ordered.
Items & Prices
DICTIONARY
Why: Prices are labels for the items.
Collections Quiz Answer Key • Reference
Code Quest Project Guide Code Quest
Build Your Own Robot Adventure!
Coder:
1
The Robot Setup
"Give your robot a name and some energy!"
bot_name = "Robby"
battery = 100
Goal: Use Variables
2
The Battery Check
"Check if the robot can move or needs power."
if battery > 10:
print("Ready to move!")
else:
print("Charge me up!")
Goal: Use If / Else
3
The Tool Bag
"Add some items for your robot to carry!"
tools = ["Wrench", "Oil", "Battery"]
for item in tools:
print(f"I have a {item}")
Goal: Use Lists & Loops
Final Challenge
"Can you add an Input line to ask the user what to name the robot?
Can you add a Dictionary to store the robot's model number and color?"
Python Capstone Project Guide • Level 1 Adventure
Python Toolkit Overview Toolkit Overview
Visual Python Foundations (51 Resources)
1-Page Cheat Sheets
Python Blocks (Basics)
List Blocks (Grocery Bag)
Collection Blocks (Dict/Tuple/Set)
Loop Blocks (Repeaters)
Function Blocks (Machines)
DSA Data Flow (Stacks & Queues)
Collection Showdown (Visual Sorter)
Visual Anatomy
Variable Anatomy (Name = Value)
Block Anatomy (If/Else Structure)
Loop Anatomy (Cycle & Stop)
Function Anatomy (Def & Call)
List Anatomy (Indexes)
Dictionary Anatomy (Keys/Values)
Concepts & Rules
Data Types
Logic Path
Comparison Rules
Symbol Map
Math Blocks
Computer Talk
Logical Links
Indentation Rule
Code Flow
String Power
Applied Practice
Logic Lab Examples (8 Scenarios)
Loop Scenarios (Gaming/Music)
Syntax Detective (8 Bug Cases)
Container Lab (Action/Reaction)
Cause & Effect Lab Guide
3 Practice Worksheets
Procedural Support
Code Path Checklist & Tree
Code Doctor Troubleshooting Guide
1-Hour Study Roadmap
Facilitator Prompt Sheets (2 Pgs)
Python Vocabulary Flashcards
Python Toolbox Decision Guide
Empowering neurodivergent learners through visual logic.
Directory • Page 1
Toolkit Directory
Part 2: Assessments, Projects & Answer Keys
Assessments
Foundations Quiz
Symbols, Data Types, Indents
Collections Quiz
Dictionaries, Tuples, Sets
Capstone
Code Quest: Robot Adventure
"Apply all foundation concepts to build a creative bot adventure."
Teacher Keys
Logic Practice Key
Collections Practice Key
Syntax Detective Key
Foundations Quiz Key
DSA Data Flow Cheat Sheet Data Flow
Stacks vs. Queues (DSA Basics)
The Stack
"Last In, First Out" (LIFO)
TOP: Newest pancake
BOTTOM: Oldest pancake
PUSH
Add to top
POP
Remove from top
"Think of a Stack of Pancakes . You eat the one on top first!"
The Queue
"First In, First Out" (FIFO)
1
2
3
ENQUEUE
Join the back
DEQUEUE
Exit the front
"Think of a Line at the Store . The first person in is the first person out!"
What is DSA?
Data Structures are ways to store info (like Bags or Lines).
Algorithms are the steps to move that info!
Python DSA Basics Cheat Sheet • Foundations 3.1
Collection Showdown Cheat Sheet Collection Sorter
The Four Big Containers
[ ]
List
( )
Tuple
{ }
Set
{ : }
Dictionary
The Tuple
"The Permanent Rule"
(10, 20, 10)
Keep Order
Doubles OK
Can't Change!
The Set
"The Unique Sorter"
{10, 20}
Random Order
NO Doubles!
Can Change
The List [ ]
"Like a grocery bag. Change items as you shop!"
The Dict { : }
"Like labels on boxes. Use a Name to find a Value!"
Which tool for the job?
"I want to save a birthday Year, Month, Day."
Answer: TUPLE (Ordered & Permanent)
"I want to clean a list of 100 names and remove repeats."
Answer: SET (Deletes Doubles)
Collection Showdown Reference Sheet • Final Visual
Code Path Checklist Code Path
Decision Tree: What am I building?
Start Here
THE BIG QUESTION
What do I want to do?
Goal
"I want to SAVE information"
Variable / List
Goal
"I want to make a CHOICE"
If / Else
Goal
"I want to REPEAT actions"
Loops
The "Why" (Cause & Effect)
IF
"Because I need to check a rule first."
FOR
"Because I have a list and want to look at everything."
DICT
"Because I want to label my values with names."
DEF
"Because I want to build a reusable tool."
Code Path Decision Guide
Post this on your desk!
Code Check
The Writing Procedure
Follow these steps for every line:
1. Pick Your Tool
Use the Decision Tree to choose Variable, If/Else, or Loop.
2. Check the Symbols
Check the Anatomy Poster . Do you need "Quotes", (Brackets), or [Square]?
3. The Colon Rule
Did you write if or for? If YES, put a Colon : at the end.
4. The Indent (Step In)
Did you use a Colon? If YES, the NEXT line must be pushed right (Tab).
5. The "Equals" Check
Are you setting a value (=) or checking a rule (==)?
6. The "Doctor" Check
"Use the Code Doctor Checklist if you see a Red Line!"
You've got this!
"It's okay to second-guess. Just follow the steps one by one."
Procedural Code Procedure • Master Checklist
Cause and Effect Lab Sheet Cause & Effect
If I do THIS... then THAT happens
THE CAUSE (Input)
score = 10
print(score)
"I set a box named score to 10."
THE EFFECT (Result)
10
THE CAUSE (Input)
if score == 10:
print("Win")
"The rule 10 == 10 is True ."
THE EFFECT (Result)
"Win"
THE CAUSE (Input)
bag = {"Apple", "Apple"}
"I put the same thing in a Set twice."
THE EFFECT (Result)
{ "Apple" }
Doubles Deleted!
"Code is just a series of causes and effects. If you change the code (cause), the result (effect) will change too!"