Initially the average is 79.5 and the passing-score list is [72, 88, 91]. After replacing 67 with 80, the average becomes 82.75 and all four values pass.
RUN PYTHON · FREE PYTHON TOOL
Python Playground with Input & Variables
Experiment with larger Python programs using file import and export, standard input, output, examples, variables and a Stop control.
Python runtime preparing…
Your result will appear here.
A WORKED TASK
Inspect a calculation before building a larger script
The sample stores four scores, calculates their mean and creates a list containing scores of at least 70. Run it unchanged, then replace 67 with 80. Compare both the printed result and the variables panel. This separates the values a program stores from the messages it prints.
A browser tab is not a persistent Python project. Stopping, reloading or closing it can discard runtime state. Save the source and necessary data separately.
What to check
- Import a .py file when you already have a script; export source before leaving the page.
- Variables are a readable summary, not a debugger that can pause at every instruction.
- Try one small input change at a time so you can connect it to the changed result.
TESTED & REVIEWED
Know what this tool does—and where to double-check
- Reviewed by
- HTML Online Viewer project
- Last reviewed
- Processing
- Code and supported files are processed in this browser tab. Runtime tools download Python WebAssembly, but do not intentionally upload your source.
- Important limitation
- The browser runtime is intentionally isolated and may not include every desktop package, system command or network feature. Verify production programs in their target Python environment.
EXAMPLE INPUT
Start small, then use your own data
Python program
scores = [72, 88, 91, 67]
average = sum(scores) / len(scores)
print("Average:", average)
print("Passed:", [score for score in scores if score >= 70])Initially the average is 79.5 and the passing-score list is [72, 88, 91]. After replacing 67 with 80, the average becomes 82.75 and all four values pass.
COMMON QUESTIONS
Python Playground FAQ
Does this upload my code or files?
No. Processing happens locally in your browser. Runtime tools download Python itself, but your source is not sent to our server.
Why can the first Python run take longer?
The browser downloads and starts the Python WebAssembly runtime. Later runs in the same tab are normally much faster.
Can I stop a program that takes too long?
Yes. Runtime tools show a Stop button while Python is working. Stopping terminates the isolated worker and a clean runtime starts when needed.