All 20 Python Games for Beginners

Every game here is a complete Python program you can play in your browser, read line by line and extend. Your progress (★ per solved challenge) is saved in this browser.

★ 0 / 60
challenges solved

Python games compared

Lines of code, time to work through the page, and the main Python ideas each game practises.

#GameLevelLinesTimeMain concepts
1⭕ Tic Tac Toe in PythonEasy7335 minLists, Functions, if, elif and else, for loops
2✊ Rock Paper Scissors in PythonBeginner4120 minThe random module, Dictionaries, if, elif and else, while loops
3🐍 Snake Game in Python (Turtle)Medium9045 minTurtle graphics, Lists, Functions, if, elif and else
4🔤 Hangman in PythonEasy5230 minStrings, Lists, while loops, if, elif and else
5🔢 Number Guessing Game in PythonBeginner3315 minThe random module, while loops, if, elif and else, input() and print()
6🏓 Pong-Style Paddle Game in PythonMedium8440 minTurtle graphics, Functions, if, elif and else, Variables
7📝 Mad Libs-Style Story Game in PythonBeginner2515 mininput() and print(), Strings, Variables, Lists
8🗺️ Text Adventure Game in PythonEasy7040 minDictionaries, Strings, while loops, if, elif and else
9🔴 Connect Four-Style Game in PythonMedium7045 min2D lists and grids, Lists, Functions, for loops
10💣 Minesweeper-Style Game in PythonMedium7745 min2D lists and grids, Functions, for loops, The random module
11🧩 Sudoku in PythonMedium5945 min2D lists and grids, Functions, for loops, Lists
12🚢 Battleship-Style Game in PythonEasy7235 min2D lists and grids, The random module, Strings, Lists
13🌀 Maze Game in PythonMedium7640 min2D lists and grids, Functions, Lists, while loops
14⬆️ Higher or Lower Game in PythonBeginner3915 minThe random module, while loops, if, elif and else, Variables
15🟩 Word Guessing Game in PythonEasy3830 minStrings, Lists, Dictionaries, while loops
16🪙 Coin Flip in PythonBeginner3315 minThe random module, for loops, Variables, if, elif and else
17🐢 Turtle Race in PythonEasy5025 minTurtle graphics, Lists, for loops, while loops
18❓ Python Quiz GameBeginner4720 minDictionaries, Lists, for loops, The random module
19➗ Math Quiz Game in PythonBeginner3820 minThe random module, Dictionaries, for loops, Functions
20⌨️ Typing Speed Game in PythonEasy4420 minStrings, Functions, for loops, Variables

Prefer to grab the code? All 20 programs on one page, ready to copy and paste.