Server spells, data vaults, and API rites
Backend Sorcerer
Forge APIs, tame databases, and command the invisible machinery behind every product.
Variables, Types & Control Flow
The Inscription
Cast your first spell. Make Python speak with print().
The Naming Rite
Store your hero's name, level, and power, then reveal them.
The Conditional Gate
A door opens only for heroes with power > 5. Make it decide.
The Loop Ritual
Count down from 5 to 1 using range(), then announce launch.
Functions & Modules
The First Incantation
Write a function that takes a name and returns a personalized welcome.
The Scope Crystal
Calculate XP with an optional bonus multiplier.
The Import Scroll
Roll a random spell power and calculate its magnitude.
The Lambda Charm
Transform and filter XP values using lambda, map, and filter.
The Error Ward
Write a safe division function that handles bad input without crashing.
Data Structures
The List Forge
Manage a party roster: add a member, remove the first, print remaining.
The Dictionary Vault
Store a hero's stats in a dictionary, award XP, and level up.
The Set Crystal
Compare two spell books and find shared/exclusive spells.
The Tuple Seal
Store fixed character stats as a tuple and unpack them cleanly.
The Comprehension Codex
Rewrite three loops as compact one-line comprehensions.
OOP: Classes & Objects
The Blueprint Chamber
Create a Hero class and summon your first instance.
The Method Forge
Give your Hero the ability to gain XP and automatically level up.
The Dunder Ritual
Make your Hero class behave like a native Python object.
The Inheritance Altar
Create a Sorcerer subclass that extends Hero with casting ability.
The Composition Pact
Build a SpellBook class and compose it into Hero instead of inheriting.