Run Python in your browser: a beginner's guide
By Live Code Tutor team · · 5 min read · Updated
A browser Python editor lets you write and execute code on a web page. Live Code Tutor uses Pyodide to run Python in your browser, so you can practise introductory programs without installing Python on your laptop.
Start with the code, not the installation
Open a lesson, wait for Python to load, and write in the editor. Your first visit downloads the runtime, so it can take longer than later runs. Keep the tab open while it loads.
Try this small program:
price = 80
quantity = 3
total = price * quantity
print(total)
Predict the result before pressing Run. Then change quantity and check the result again. You are practising variables and arithmetic without configuring a terminal, editor extension, or package manager.
Run and Run tests answer different questions
Run asks: what happens when this code executes? Look for printed output or an error in the output area below the editor.
Run tests asks: does this solution meet the task? Tests compare values or output against expected results. A program can finish without an error and still produce the wrong answer.
For example, a task might require the number 240. Printing the text "240" looks similar on screen, but text and numbers are different kinds of values. Read the task and the test feedback carefully.
When a test fails, identify one difference. Change that part of the code, run the test again, and check whether your reasoning was right.
Find the controls on your laptop
The lesson has three views: the task, your code and output, and the AI coach. Larger screens show them together. Smaller screens use Task instructions, Write code, and Ask coach buttons so each view has enough room. Switching views keeps your code. AI help requires a free account; the code runner and tests work without one.
You can also run code with Ctrl+Enter, or Cmd+Enter on a Mac. Use Ctrl+Shift+Enter or Cmd+Shift+Enter for tests. If you prefer buttons, the Run and Run tests controls stay above the editor.
Reset restores the lesson starter. If you reset by accident, use Undo reset in the same lesson tab. Keep the page open until you have recovered the code you want. For all the controls in order, read How to use Live Code Tutor.
Know where your work goes
Browser execution and account storage are separate. The code executes in your browser. When you sign in, your lesson draft and progress can be saved to your account. Asking the AI tutor shares the relevant code and lesson context so it can help. Pro watch mode also observes code changes for automatic coaching.
Check the save status above the editor. Code saved to account means the draft has been saved. If saving is unavailable, keep the tab open and wait for recovery. A guest draft stays in the same browser and is not a substitute for an account backup.
For personal study notes, use the Save note button. Write down an idea in your own words; it is easier to return to a short explanation than a copied answer.
When a browser is enough, and when to install Python
A browser is a useful place for short exercises, examples, and checking an idea. It removes setup friction and lets you focus on the concept.
It is not a complete replacement for every Python environment. Larger projects, some third-party packages, native system libraries, server programs, and direct operating-system access may need a local or hosted development environment. Browser runtimes also have memory and execution limits.
Start with the environment that supports the task in front of you. When you begin a project that needs more tools, learn that setup as its own small step.
Ready to try? Open the first Python lesson, or browse the lesson catalogue. The help guide covers runtime loading, saved work, and tutor questions.
Further reading
Make your next step a small one.
Try a Python lesson, then save your progress with a free account.