🐍 💻 🎮 🚀 📋

🐍Python Adventure

Overall Progress
0%

🐍 Snake Sorter

Sort incoming values into their correct Python type bins!

🎯Score: 0

🐍 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 True or False

🎯 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' → str
  • 0, 42, -7 → int
  • 3.14, 2.0, 0.5 → float
  • True or False → bool
Round: /10
Score: 0
🔥 Streak: 0
Lives: ❤️❤️❤️
What Python type is this value?
Press Start!
📝
str
"text"
🔢
int
42
🌊
float
3.14
bool
True/False

🎉 Snake Sorter Cleared!

You know your Python types! The Operator Duel awaits!

⚔️ 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
Round: 1/10
Score: 0
What does this Python expression evaluate to?
Press Start!

🎉 Operator Duel Won!

Python math mastered! Enter the Python Path!

🔄 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 right
  • move_left() — one step left
  • move_down() — one step down
  • move_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

Moves: 0
🐍 Write Your Python Loop
Write code to move your snake! 🐍

🎉 Python Path Conquered!

Loops mastered! Enter the Def Machine!

⚙️ 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 * 2 with n=510
  • The return line is the answer!
  • Watch for len(), str(), .upper()
Round: 1/6
Score: 0
📥 Input
🐍 The Def Machine
loading...
🐍 🐍 🐍 →
📤 Output = ?

🎉 Def Machine Mastered!

Functions unlocked! Conquer the List Lab!

📋 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]
Round: 1/6
Score: 0
⬅️ Before
which method?
?
✨ After

🎉 List Lab Complete!

Python lists mastered! Enter the Code Crossroads!

🚦 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 if condition
  • 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 → TRUE
  • if "a" == "b" → FALSE
  • if "py" in "python" → TRUE
  • if len([1,2]) == 3 → FALSE
Score: 0
Correct: 0/8
x = 10
if (x > 5):
🐍
TRUE
condition is met
OR
FALSE
condition fails

🎉 Code Crossroads Conquered!

if/else mastered! Enter the String Splicer!

🔤 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"]
Round: 1/6
Score: 0
⬅️ Before
which method?
?
✨ After

🎉 String Splicer Complete!

Strings mastered! Enter the Dict Safe!

🗝️ 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"]1
  • d.get("c","N/A")"N/A"
  • "b" in dTrue
Round: 1/6
Score: 0
🗝️ What does this expression return?

🎉 Dict Safe Cracked!

Dictionaries mastered! Enter the Loop Tracer!

🔁 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!
Round: 1/8
Score: 0
📋 Read this Python code carefully:
What is x after the loop finishes?

🎉 Loop Tracer Complete!

Loop logic mastered! Face the Bug Boss!

🐛 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 of def / if?
  • Using = instead of == to compare?
  • Wrong list index? Lists start at [0]!
  • Missing indentation inside if block?
🦹
⚠️ THE PYTHON BUG BOSS
5 / 5 bugs remaining

🐛 Bug 1 of 5

script.py👆 Click the buggy line

🔧 Choose the Fix

👆 Click the buggy line first!

🏆 Bug Boss DEFEATED! Python Adventure Complete!

You've mastered Python types, operators, loops, functions, lists, conditions, strings, dicts, tracing, and debugging!

⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐