🫠

I always recommend this tool to beginners for step-by-step visualization of code execution.

Why is it useful?

1️⃣ Visualization of the reference model. In Python, everything is an object. Beginners constantly stumble on mutability and the fact that a = b is not copying data, but creating a second reference to the same piece of memory. In PythonTutor, this is drawn with arrows so clearly that even a humanities student will understand.
2️⃣ Call stack and frames. If you get confused with recursion or don't understand why a variable inside a function "suddenly" disappeared, look at the right panel while executing the code. It clearly shows how function frames are created and collapsed.
3️⃣ Step-by-step execution. You literally go step by step, seeing how values change in each loop iteration. For catching logical errors in small algorithms, it's indispensable.

Now they've also added an "AI tutor". You can ask the neural network why the code is crashing. On the free plan, you get one question per hour.

#toolbox