Skip to main content

Python Playground

Write real Python and run it right here in your browser. Choose an example, edit the code, and press Run to see the output.

Class 10 · Chapter 3 · Try this: Change the message inside print() to something of your own, then run it.
PY

Editable code area for Python. Press Tab to indent by two spaces. Press Escape to move focus out of the editor.

Output

Press Run to execute your Python code. Output from print() will appear here.

Tip: press Ctrl + Enter to run. Real Python runs in your browser and your code is saved only on this device. Avoid infinite loops (like while True: with no break) — they cannot be force-stopped and will freeze the page until you reload.

About this playground

This playground runs genuine Python — the same language and behaviour you study for your exams — using Pyodide, which brings CPython to the browser through WebAssembly. Because it is real Python, the output and error messages match what you would see on a normal computer, which makes it ideal for checking your understanding.

The examples cover the building blocks from the Class 10 programming chapters: the print() function, variables and data types, for loops with range(), and if / else decisions. Read the task above each example, predict the output, then run it to check.

Want to build web pages instead? Try the Web Playground, or study the full Python programming notes.