Python Tutorial
Python Projects
Ten complete Python programs you can run in the browser: games, tools, and a small data report.
What a project is on StudyGrid
A lesson shows one idea. A project puts several ideas in one program: lists with loops, functions with decisions, dictionaries with totals. Each page here is a full walkthrough. You read why the design looks that way, copy a working program, then change it.
Run every example in the Python editor at /try. That editor is not HTML, C, or C++. The programs use printed demo data so Run works immediately. After you understand the logic, swap ininput() if you want to type values yourself.
10 build-along projects. Each page walks through the design, then a working program you can open inTry Python at /try. Change a value, run it again, then try the practice tasks at the bottom.
The 10 projects
Guess the Number
A guessing game that picks a secret integer, counts attempts, and gives high/low hints until you win.
random · while · ifBeginnerCalculator
A four-function calculator that parses an operator, guards divide-by-zero, and prints a clean result.
functions · if · floatBeginnerTo-Do List
Keep tasks in a list: add, show, complete, and delete items without losing the rest of the list.
list · append · popBeginnerPassword Generator
Build random passwords from letters, digits, and symbols, then check that each one meets a length rule.
random · string · joinBeginnerWord Counter
Count characters, words, and lines in a block of text, then list the most common words.
split · dict · sortedBeginnerTemperature Converter
Convert Celsius, Fahrenheit, and Kelvin with functions so each scale is a one-line formula.
functions · round · formulasIntermediateQuiz Game
A scored multiple-choice quiz stored as dictionaries: ask, check, tally, and print a report.
dict · for · scoreIntermediateHangman
Guess letters in a hidden word. Track lives, reveal matches, and stop when the word is complete.
set · while · stringsIntermediateExpense Tracker
Record amounts by category, print a table, and compute totals and the largest spend.
list · dict · sumIntermediateCSV Report
Parse rows of sales data, compute totals per product, and print a sorted report.
csv · dict · sortedHow to work a project
- Read the goal and the skills list.
- Copy the first small example and run it.
- Build up to the complete program on the same page.
- Change one value. If the output still makes sense, you understood it.
- Do the practice tasks at the bottom before you open the next project.