Beginners · no install

Online Python Compiler

Syntax mistakes are underlined. Press Run and the error shows up in plain English, with the line number. Sketch the grade scale on the canvas, then write that scale with for and if. Flow splits the code by class and method, and draws loops, if, and try as arrows.

Smart canvas
Output
Run the code. print() shows up here.

Python Compiler

The compiler does not send your code to a server. The Python 3.12 interpreter runs in the browser. print lines land in the output box. A broken line is underlined, and Run explains the mistake in plain English. input() is not available here; put the value in the code.

What Flow shows

Flow replaces the canvas and reads the code in the editor, on your device. Nothing is sent away for that reading. Class and module cards line up on the left. The starter sample has no class, so the only card is Module. Under it sit the notlar variable and a button for the for loop. harf is assigned inside the loop, so it shows up among that card’s variables.

Press Module and a short explanation opens beside a flow chart. The chart runs top to bottom. for puan in notlar is a loop box. The arrow above it says each pass: 95, 82, 70, 55, and 49 enter that box in order. When the pass ends, the caption says back to loop and the next score steps in. One list is written once and walked five times.

Inside the loop, if, elif, and else share one branch. The first threshold is 90 and AA. When it misses, the arrow says otherwise and the next threshold follows: 80 is BA, 70 is BB, 60 is CB, 50 is CC. If none match, the else arm writes FF. 95 stays on the first threshold. 82 misses it and lands on the second. The order of the thresholds changes the letter. Put 70 before 90 and 95 is read as BB; the chart makes that order visible.

Turn the same scale into a class and the cards multiply. Write class NotDefteri with def harf inside it and a NotDefteri card appears, with the harf method under it. Press the method and the chart draws only that method’s body. A nested function becomes its own button. A with block steps down under the label inside. Leaving a try arm, the arrow says then. finally sits at the bottom under always. match arms split with matches and or.

Flow is the map next to Run. Run writes print lines into the box below and states a syntax error in plain English, with the line number. Flow shows which card holds a variable, where a loop returns, and which condition takes the turn. Press Pen and the canvas comes back, with the grade scale you drew. Scale toggles the ready-made bands, Eraser lifts a stroke, and Clear empties the board.

for, while, and if

Letter grades

The sample in the editor is the Letter Grades scale. After the guides, write that mapping as a function and run it against the hidden tests.

Open the letter-grade question

Frequently asked questions

What does the Flow button do?

It splits the code into classes, methods, and the module. Loops, if, try, with, and match line up as arrows. Run writes the output. Flow draws the order.

Where do I see a syntax error?

The editor underlines the broken spot. Press Run and the same mistake is written in plain English, with the line number.

What is Online Python?

A page where you write and run Python in the browser. print output appears on the same screen. Nothing is installed.

How does this Python compiler run?

The Python interpreter loads in the browser. The code runs on your device.

Which problem do the for and if examples lead to?

Letter Grades. You turn a list of numeric scores into AA, BA, BB, CB, CC, and FF.