🐍 Snake Sorter
Sort incoming values into their correct Python type bins!
🐍 Snake Sorter — Python Types
A value appears — click the correct Python type bin before you run out of lives!
📚 What You'll Learn
- str: Text in quotes —
"hello" - int: Whole numbers —
42,-7 - float: Decimal numbers —
3.14,2.0 - bool: Only
TrueorFalse
🎯 How to Play
- A Python value appears in the spotlight
- Click the correct type bin below
- 3 lives — wrong answers cost one life!
- 10 rounds — build your combo streak!
💡 Cheat Sheet
"text"or'text'→ str0,42,-7→ int3.14,2.0,0.5→ floatTrueorFalse→ bool
⚔️ Operator Duel — Python Math Battle
A Python expression appears — pick the correct result before time runs out!
📚 What You'll Learn
- // Floor division — rounds down:
7 // 2 = 3 - ** Exponentiation:
2 ** 3 = 8 - % Modulo — remainder:
10 % 3 = 1 - += / -= Shorthand operators
🎯 How to Play
- Read the Python expression on the card
- Pick the correct answer from 4 options
- You have 8 seconds per round!
- Faster answers = bonus points! ⚡
💡 Cheat Sheet
7 // 2→ 3 (not 3.5!)2 ** 4→ 16 (2×2×2×2)10 % 3→ 1 (leftover)x = 5; x += 3→ x is 8
🔄 Python Path — Loop Labyrinth
Write Python for loops to guide the snake 🐍 through the maze to the exit 🚪!
📚 What You'll Learn
- for loop: Repeat an action N times
- range(n): Generate numbers 0 to n-1
- Indentation: Python uses 4 spaces for blocks
- Sequential code: Lines run top to bottom
🎯 Commands
move_right()— one step rightmove_left()— one step leftmove_down()— one step downmove_up()— one step up
💡 Loop Example
for i in range(3):move_right()- ↑ Moves right 3 times
- Fewer moves = more stars! ⭐
🗺️ The Maze — Level 1/3
⚙️ Def Machine — Python Functions
A value enters the machine — click the correct output it produces!
📚 What You'll Learn
- def: Define a reusable function
- return: Send a value back
- Parameters: Inputs the function accepts
- Built-ins:
len(),str(),int()
🎯 How to Play
- Read the Python function inside the machine
- See the input value on the left
- Click the correct output on the right
- 6 rounds — trace the logic step by step!
💡 Pro Tips
- Substitute the input manually
return n * 2withn=5→10- The
returnline is the answer! - Watch for
len(),str(),.upper()
📋 List Lab — Python List Methods
See the before and after lists — click the method that makes the transformation!
📚 What You'll Learn
- append: Add item to the end
- remove: Delete a specific item
- sort: Sort items in order
- reverse: Flip the list order
🎯 How to Play
- BEFORE list is shown on the left
- AFTER (result) list is on the right
- Click the method that transforms it
- 6 rounds — each reveals a new power!
💡 Quick Guide
[1,2].append(3)→[1,2,3][1,2,3].remove(2)→[1,3][3,1,2].sort()→[1,2,3][1,2,3].reverse()→[3,2,1]
🚦 Code Crossroads — Python if Statements
The hero reaches a fork — which path does the Python code take?
📚 What You'll Learn
- if statement: Runs code when condition is True
- else: Runs when condition is False
- Comparison:
==,!=,>,<,>= - in operator: Check if item is inside
🎯 How to Play
- Read the variable and the
ifcondition - Click TRUE if the condition is met
- Click FALSE if the condition fails
- 8 scenarios — fill the dots to win!
💡 Quick Examples
if 10 > 5→ TRUEif "a" == "b"→ FALSEif "py" in "python"→ TRUEif len([1,2]) == 3→ FALSE
🔤 String Splicer — Python String Methods
See the before and after strings — click the method that made the change!
📚 What You'll Learn
- upper/lower: Change letter case
- strip: Remove surrounding whitespace
- replace: Swap part of a string
- split: Break string into a list
🎯 How to Play
- BEFORE string is on the left
- AFTER string/value is on the right
- Click the string method that caused it
- 6 rounds — learn every string power!
💡 Quick Guide
"hi".upper()→"HI"" hi ".strip()→"hi""cat".replace("c","b")→"bat""a,b".split(",")→["a","b"]
🗝️ Dict Safe — Python Dictionaries
A Python dictionary is shown — crack the lookup and pick the correct value!
📚 What You'll Learn
- dict: Key-value pairs in curly braces
- d["key"]: Access value by key
- d.get("key"): Safe access with default
- "key" in d: Check if key exists
🎯 How to Play
- A Python dictionary is displayed
- A query operation is shown below
- Pick the correct result from 4 options
- 6 rounds — crack the safe!
💡 Quick Guide
d = {"a":1,"b":2}d["a"]→1d.get("c","N/A")→"N/A""b" in d→True
🔁 Loop Tracer — Trace the Variable
A loop runs — trace the variable and pick the correct final value!
📚 What You'll Learn
- while loop: Repeat while condition is True
- +=, -=: Increment/decrement variables
- Loop termination: When the condition turns False
- Accumulation: Building a value across iterations
🎯 How to Play
- Read the Python loop code
- Mentally run through each iteration
- Pick the final value of the variable
- 8 rounds with a timer for bonus points!
💡 Tracing Tip
- Write each iteration: x=0→2→4→6
- Stop when condition becomes False
while x < 5: x += 2→ x=6- Use scratch paper if needed!
🐛 Bug Boss — Python Debugging!
The Bug Boss stands between you and victory — fix Python bugs to drain its HP!
📚 What You'll Learn
- = vs ==: Assignment vs comparison
- Indentation: Python requires 4 spaces
- Colons: Required after
def,if,for - Index errors: Lists start at index 0
🎯 How to Play
- The Bug Boss has 5 HP — one per bug
- Click the line of code that contains the bug
- Then pick the correct fix from the options
- Each fix removes 1 HP from the Boss!
💡 Bug Hunting Tips
- Missing
:at end ofdef/if? - Using
=instead of==to compare? - Wrong list index? Lists start at
[0]! - Missing indentation inside
ifblock?