Guessing Game+
Console Β· loops, conditionals, random
Session 1: Guessing Game+ β loops, conditionals & functions
Everything for this session lives on this one page β play, learn, quiz, remember.
Play a round, finish the quiz, then complete the solo challenge.
Learn the logic by feeling it first. Invalid input is free; a valid wrong guess costs one life.
Tap a concept to highlight the exact lines that make it work.
Choose a concept above. Its lines will light up here.
Predict the program before checking. That is how reading code becomes a skill.
Tap each card to flip it. Say the explanation out loud before you reveal the back.
hot_cold.pyWrite this one yourself. Borrow patterns, not whole answers.
Pick a secret number 1β20, give the player 5 tries. After each guess print Hot! if within 3 of the secret, else Cold!. Show a win message on a correct guess and reveal the number on a loss.
random.randint like the game above.abs(guess - secret) <= 3 means hot.isdigit + continue.Open one session at a time. Each has a playable browser demo, a runnable Python lesson example based on that demo, a code-reading quiz, flashcards, and a solo build.
Do not run the code first. Trace it line by line, predict the output, then check the walkthrough. That habit is how unfamiliar code stops feeling unfamiliar.
A plain-English reminder of the ideas used across the journey. Read the tiny example, then look for the same shape in a project.
Sessions 2β9 are available in the interactive lessons above. Sessions 8β9 share one combined capstone.
Console Β· loops, conditionals, random
Files Β· save/load scores; refactor into functions
Dictionaries Β· analyze real text
Files Β· shout, reverse, stat-pack any text file
Complex data structures Β· nested dicts as game rules
Advanced files Β· multi-file letter values
Refactor everything Β· username generator
Combined capstone Β· plan, build, test and review