Python Practice Labs
Real Python. In your browser. No installs.
10 hands-on labs for students who’ve completed Introduction to Python. Write code, click Run, see results — instantly.
Progress is saved in your browser. No account needed.
Powered by Pyodide — Python runs right here
No accounts. No downloads. No Jupyter. No Replit. Python runs directly in your browser using Pyodide — a full Python runtime compiled to WebAssembly. Everything stays right here on this page.
📋 Before You Start
These labs assume you know the basics — variables, loops, functions, lists. If you’ve completed our Introduction to Python course, you’re ready. If not, start there first!
🟦 Foundations — Labs 1–4
Variables & Data Types
Review int, float, str, bool, type conversion, and f-strings. Build a complete student profile.
Open Lab →Conditionals & Logic
Master if/elif/else, comparison and logical operators, and nested conditions. Write FizzBuzz and a grade calculator.
Open Lab →Loops & Iteration
Practice for loops, while loops, range(), enumerate(), zip(), break, and continue. Analyze weekly sales data.
Open Lab →Functions
Build functions with defaults, return values, *args, and **kwargs. Create a full unit converter toolkit.
Open Lab →Lists & Dictionaries
Master list comprehensions, dict operations, .get(), .items(), and sorting with key=. Build a shopping cart system.
Open Lab →String Methods
Deep dive into .strip(), .split(), .join(), .replace(), slicing, and f-strings. Build a Caesar cipher and text analyzer.
Open Lab →Working with Data
Work with lists of dicts, sort/filter/aggregate without pandas. The foundation of data analysis. Build a sales processor.
Open Lab →pandas Basics
Create DataFrames, filter rows, groupby, .describe(), and basic aggregations. Answer business questions with pandas.
Open Lab →Data Visualization
Build bar, line, scatter, and histogram charts with matplotlib. Create multi-panel dashboards with subplots.
Open Lab →Capstone Project
A real mini data analysis project. You’re a data analyst with 5 business questions to answer — using pandas, matplotlib, and everything you’ve learned.
Open Lab →How Each Lab Works
Every lab follows the same 5-part structure so you always know what to expect.
Concept Recap
A quick review of the key ideas you’ll practice — no new theory, just a reminder.
Worked Example
A complete, runnable code example showing the concepts in action.
Guided Exercise
Starter code with blanks to fill in. Lower stakes, lots of hints.
Independent + Challenge
Two exercises where you write more on your own. The challenge pushes further.
Mini Project
A complete real-world task that ties the whole lab together.
Technical notes
- Labs 1–7 load instantly — just pure Python, no external packages.
- Labs 8–10 load pandas, numpy, and matplotlib from the web — allow 10–20 seconds on first load.
- Everything runs locally in your browser tab. Nothing is sent to a server.
- Works best in Chrome or Firefox. Safari should work too.
- Your code is NOT saved between page refreshes. Copy anything you want to keep.