Back
+10 XP
Concept

Top to Bottom Execution

Python executes code strictly from top to bottom, one line at a time:

python
print("Step 1: Download files")
print("Step 2: Install update")
print("Step 3: Complete")

# 5. Top to Bottom Execution Python executes code strictly from top to bottom, one line at a time: ```python print("Step 1: Download files") print("Step 2: Install update") print("Step 3: Complete") ``` It doesn't jump around, skip lines, or read backwards. Line 1 finishes before Line 2 even knows it exists.

Checkpoint

If your file has 3 print statements, which one prints first?

Practice

Write a 3-line script that prints `"3"`, then `"2"`, then `"Liftoff!"` in exact top-to-bottom order.

Terminal
01
Tap code blocks below to assemble
Available Blocks