Python projects for beginners
Complete programs to run in your browser, read part by part, and make your own.
Games
- Number guessing game
Your guess (1-100): 50 Too high. 6 tries left. Your guess (1-49): 60 The number is between 1 and 49.
Beginner · about 30 min · random.randint, while and for loops - Rock paper scissors
Rock, paper or scissors? (r/p/s): lizard Please type r, p or s. Rock, paper or scissors? (r/p/s): s You chose scissors, the computer chose paper.
Beginner · about 30 min · dictionaries, random.choice - Hangman
Guess a letter: e Yes, e is in the word. Word: _ _ _ _ _ e Missed: none Guess a letter: a
Beginner · about 45 min · lists and sets, multi-line strings - Tic-tac-toe
Choose 1, 2 or 3: 2 You are X and you go first. 1 | 2 | 3 4 | 5 | 6
Intermediate · about 75 min · lists, tuples of winning lines - Dice rolling simulator
Choose 1, 2 or 3: 1 How many dice? (1-5): 2 +-------+ +-------+ | o | | o |
Beginner · about 40 min · random.randint, dictionaries for counting - Quiz game
Your answer (A-D): d Correct. Question 2. What is the value of 7 // 2? A) 3.5
Beginner · about 40 min · lists of dictionaries, random.sample and random.shuffle - Blackjack
Your bet (1-100), or 0 to leave: 500 Please type a whole number from 0 to 100. Your bet (1-100), or 0 to leave: 20 Dealer: J of spades, [hidden card]
Intermediate · about 90 min · lists of tuples, list comprehensions - Word guessing game
Guess 1 of 6: crane C R A N E . . . ? + Not in the word: A C R
Intermediate · about 60 min · string indexing, lists and sets - Text adventure game
> go south The door is locked. > n You are in a library with tall shelves of old books.
Intermediate · about 90 min · nested dictionaries, parsing commands with split - Word story game
Choose a story: 1 Fill in 9 words for a story. No peeking. Place (like the library): the moon Name (a person's name): Mr. Patel
Beginner · about 30 min · str.format with named fields, lists of tuples - Higher or lower
Higher or lower than 9 of hearts? (h/l): h Next card: J of spades. Right. Streak: 1 Higher or lower than J of spades? (h/l): x Please type h for higher or l for lower.
Beginner · about 40 min · lists of tuples, random.shuffle - Four in a row
Player X, choose a column (1-7): 4 1 2 3 4 5 6 7 |. . . . . . .| |. . . . . . .|
Intermediate · about 90 min · lists of lists, nested loops - Typing speed test
Press Enter to start the clock: Type it here: Python code is meant to be read by people as well as computers. Time: 14.4 seconds Speed: 53 words per minute
Intermediate · about 45 min · time.perf_counter, difflib.SequenceMatcher - Multiplication quiz
Which tables? (like 3 7, 2-5 or all): 3 to 7 Type numbers from 1 to 12, a range like 2-5 or all. Which tables? (like 3 7, 2-5 or all): 3 7 How many questions? (5-20): 6
Beginner · about 40 min · random.choice and random.randint, time.perf_counter - Minesweeper
Choose a level (1-3): 1 A B C D E F Mines: 4 Flags: 0 1 # # # # # # 2 # # # # # #Intermediate · about 90 min · sets, dictionaries
Useful tools
- Calculator
Choose 1-8: 1 First number: 12 Second number: 30 Add: 12 + 30 = 42
Beginner · about 40 min · functions, dictionaries - To-do list
Choose 1-5: 1 New task: Finish maths homework Added: Finish maths homework 1) Add 2) List 3) Mark done 4) Delete 5) Quit
Beginner · about 45 min · file handling, lists of dictionaries - Password generator
Password length (8-64, Enter for 16): abc Please type a whole number. Password length (8-64, Enter for 16): 5 Please choose a number from 8 to 64.
Beginner · about 35 min · secrets module, string constants - Unit converter
Choose 1-4: 1 Length units: mm, cm, m, km, in, ft, yd, mi From unit: km To unit: mi
Beginner · about 40 min · dictionaries of factors, functions - BMI calculator
Choose 1-3: 1 Weight in kg: 72 Height in cm: 175 Your BMI is 23.5: Healthy weight
Beginner · about 30 min · functions that return tuples, input checks - Expense tracker
Choose 1-4: 1 Date (YYYY-MM-DD, Enter for today): 2026-10-01 1) Food 2) Transport 3) Bills 4) Shopping 5) Fun 6) Other Category 1-6: 1
Intermediate · about 60 min · csv module, datetime dates - Contact book
Choose 1-6: 1 Name: Asha Rao Phone: 98765 43210 Email (optional): asha@example.com
Intermediate · about 60 min · classes and methods, lists of objects - ATM machine
Enter your 4-digit PIN: 1111 Wrong PIN. 2 tries left. Enter your 4-digit PIN: 1234 Hello, Asha.
Intermediate · about 45 min · classes and methods, loops with a counter - Student grade manager
Choose 1-4: 1 Student name: Asha Rao English (0-100): 78 Maths (0-100): 91
Intermediate · about 60 min · dictionaries, lists of tuples - Library management system
Choose 1-7: 1 ID Title Author Status B101 Wings of Fire A. P. J. Abdul Kalam Available B102 Malgudi Days R. K. Narayan Available
Intermediate · about 75 min · classes and objects, dictionaries - Age calculator
Date of birth (DD-MM-YYYY): 16-06-2009 Age on which date? (DD-MM-YYYY, Enter for today): 22-10-2026 Age: 17 years, 4 months and 6 days That is 6,337 days (905 weeks and 2 days).
Intermediate · about 45 min · datetime and strptime, calendar.monthrange - Currency converter
Choose 1-3: 2 Code Currency Per 1 USD USD US dollar 1.0000 EUR Euro 0.8600
Beginner · about 30 min · dictionaries of tuples, functions
Text and words
- Caesar cipher
Choose 1-4: 1 Message to encrypt: Meet me at the park at noon Shift (1-25): 3 Encrypted: Phhw ph dw wkh sdun dw qrrq
Beginner · about 40 min · ord() and chr(), % for wrapping around - Morse code translator
Choose 1-3: 1 Text: Hello, World Morse: .... . .-.. .-.. --- --..-- / .-- --- .-. .-.. -.. 1) Text to Morse 2) Morse to text 3) Quit
Beginner · about 30 min · dictionaries, dictionary comprehensions - Text analyzer
> Python was created by Guido van Rossum and first released in 1991. Today Python is used for websites, data science, games and teaching. > Why do so many beginners start with Python? It reads almost like English, so beginners can focus on ideas. Many schools teach Python, and many games are written in it. > Text report
Beginner · about 45 min · re.findall and re.split, collections.Counter - Pig Latin translator
English (or press Enter to quit): The quick brown fox jumps over the lazy dog. Pig Latin: Ethay ickquay ownbray oxfay umpsjay overway ethay azylay ogday. English (or press Enter to quit): Hello, World. I'm learning Python in 2026. Pig Latin: Ellohay, Orldway. I'mway earninglay Ythonpay inway 2026.
Beginner · about 30 min · string slicing, enumerate() - Acronym generator
Phrase (or press Enter to quit): National Aeronautics and Space Administration Letters from: [N]ational [A]eronautics and [S]pace [A]dministration Acronym: NASA With dots: N.A.S.A.
Beginner · about 25 min · list comprehensions, zip() - Number to words
Number (or press Enter to quit): 7 7: seven Number (or press Enter to quit): 42 42: forty-two
Beginner · about 45 min · divmod(), lists as lookup tables
Logic and puzzles
- Sudoku solver
Choose 1-3: 1 Puzzle Solution 5 3 . | . 7 . | . . . 5 3 4 | 6 7 8 | 9 1 2 6 . . | 1 9 5 | . . . 6 7 2 | 1 9 5 | 3 4 8
Intermediate · about 60 min · recursion, backtracking - Maze solver
Choose 1-3: 1 Maze Solved #S # # #S # # # ### # ##### # #.### # ##### #
Intermediate · about 60 min · breadth-first search, collections.deque - Game of Life
Pattern (glider, blinker, toad, beacon, random): glider Generations (1-30): ten Please type a whole number from 1 to 30. Generations (1-30): 5
Intermediate · about 45 min · sets of tuples, collections.Counter
More to build
Games with graphics
Pygame games that play in the browser, with their full code.
Drawings
Turtle programs that draw flags, spirals, fractals and festive scenes.
Data projects
Step-by-step lessons that analyse and clean real-looking data.
Shorter programs for practice, including the CBSE class 11 and 12 practical lists, are in Python programs.