Learn Python Concepts Through Games
Short, friendly explanations of the Python ideas every game uses, each with examples you can run right here and links to the games that practise it.
- 💬input() and print()Talk to the player: show text and read answers. · 3 games
- 📦VariablesRemember scores, lives and names. · 7 games
- 🔀if, elif and elseDecide who wins and what happens next. · 11 games
- 🔁while loopsKeep the game running until it's over. · 12 games
- 🔄for loopsRepeat a set number of times or go through a list. · 9 games
- 🎲The random moduleSurprise the player with randomness. · 17 games
- 📋ListsStore boards, inventories and snake bodies. · 12 games
- 🔡StringsWork with words, letters and messages. · 7 games
- 📖DictionariesLook things up by name: rules, rooms, scores. · 5 games
- 🧰FunctionsSplit a game into small, testable pieces. · 10 games
- 🔲2D lists and gridsBuild boards for Four in a Row, mazes and Sudoku. · 5 games
- 🐢Turtle graphicsDraw and animate games with the built-in turtle. · 3 games