Map Road Chapters
Rover the Guide
Welcome to World 4: Python Quest! Before you start coding Rover's missions, let's learn the core programming concepts: 1. VARIABLES: Containers that store data. Example: hp = 100 name = "Rover" 2. LOOPS: Commands that repeat code block instructions. Example: for i in range(3): print("collect") 3. FUNCTIONS: Group of reusable instructions. Example: def blast(): print("fireball!") To calibrate Rover's memory cells, let's execute a calibration output.
Quest Objective
Use the `print()` statement to output `"Calibrated"` (case-sensitive) to finish your system training.
Level Secrets
2 secrets leftWelcome to Python Quest! ๐โจ
Learn Python concepts with magic boxes, superpower moves, and friendly bot companions before launching into coding missions!
1. Variables & Magic Boxes
Data ContainersVariables are like labeled magic boxes that hold numbers, names, and secret game scores so you can use them anytime!
hp = 100 # Player health
name = "Rover" # Robot name
is_online = True # Status
2. Print & Speech Bubble
Console CommunicationThe print() statement lets your robot speak! It displays messages and scores on the terminal screen.
print("Hello Future Coder! ๐")
print("Current Points:", 150)
3. Data Types & Numbers
Text, Integers & BooleansPython uses different types of building blocks: Numbers (123), Words ("hello"), Decimals (9.5), and True/False!
level = 5 # Whole number (int)
speed = 12.5 # Decimal (float)
status = "Level " + str(level)
4. Decision Logic (If / Else)
Smart Branching ChoicesMake your robot super smart! Use if/else so your robot decides what action to take based on the situation.
if hp < 50:
print("Drink repair potion! ๐งช")
else:
print("Engage laser beam! โก")
5. Super Loops
Automatic RepetitionInstead of writing the same command 100 times, a loop repeats your code automatically as many times as you want!
# Repeat 3 times:
for i in range(3):
print("Collect shiny gem! ๐")
6. Superpower Functions
Custom Reusable MovesFunctions pack a group of actions into one superpower move! Give it a name and call it anytime.
def blast():
print("FIREBALL BLAST! ๐ฅ")
ย
blast() # Launch superpower!
7. Inventory Lists
Item CollectionsLists are like backpacks! Store items, swords, and potions together inside square brackets [ ].
bag = ["sword", "shield", "potion"]
print(bag[0]) # Gets "sword"
bag.append("gem") # Adds item
8. Creature Dictionaries
Key-Value ProfilesDictionaries store creature profiles with key names like "power" and "type" inside curly braces { }!
dragon = {
"name": "Draco",
"power": 95
}
print(dragon["name"])
9. Robot Classes & Blueprints
Build Custom AI CompanionsClasses are blueprints for building custom companion bots with names, greetings, and special talents!
class Companion:
def greet(self):
print("Beep Boop! I am Sparky ๐ค")
ย
bot = Companion()
bot.greet()
10. Error Shield Protection
Try & Except DefenseTry/Except blocks protect your code from accidental bugs and glitches so your game never crashes!
try:
result = 100 / 0
except:
print("Shield activated! Bug blocked ๐ก๏ธ")
Ready to Code Rover's Missions?
You've explored all Python topics! Click below to start live coding missions in Chapter 1!