Trace Table Interactive Example

Step through the Python code and watch variables change

Speed: 500ms
Step 0 of 11

Python Code

1 sum = 0
2 for i in range(1, 6):
3     sum = sum + i
4 print("The total sum is:", sum)

Trace Table

Step Line i sum Explanation
Previous   Next   Space Auto-play