Catnip Compiler

Write Python. See what happens.

Try an example, change the code, and run it right here.

Python runs in your browser
main.py
Ready
Program input
Each call to input() reads the next line here.
Output
Your output will appear here.

Start with an example

Debug

Learn with small Python programs

Change one line at a time, then run your program to see the result. These examples help you connect each Python idea to its output.

1. Variables store values

In price = 12, the name price refers to the number 12. Try the “Numbers & variables” example, change the quantity, and predict the new total before running it.

2. Input arrives as text

input() reads one line from Program input. If you need a number for arithmetic, convert it with int(). Enter 75 in the “Make a choice” example, then try 40.

3. Loops repeat work

The “A counting loop” example uses range(1, 6) to produce 1 through 5. Change 6 to 4 and compare the output. Python uses indentation to decide which lines belong to the loop.

4. Debug a mistake

Press Debug to run your code and step through executed lines. Inspect variable values before each line runs. The debugger is designed for small beginner programs and stops recording after 200 steps.

About Catnip Compiler

Catnip Compiler is a practice space for people learning Python. It runs code in your browser, so you can experiment with variables, input, decisions, and loops without installing Python. “Generate starter” inserts a selected example template; it does not use AI. Java support is planned for a later version.

Your code runs on your device. It is not saved to an account. Shared links contain the code in the link itself: anyone with the link can read it. Avoid putting passwords or private information in your programs. The first run may take a moment while Python loads.

Generate starter code

Pick a beginner project. You can edit every line after it loads.

Contact us

Questions or feedback about Catnip Compiler? Write to contact@catnipcompiler.com. This address will receive messages once domain email forwarding is configured.