print("First")
print("Second")Line-by-line explanation
- The first line runs first.
- The second line runs next.
- The output follows that same order.
A decision can change that path. Think of a road junction: the program chooses one road based on a yes-or-no condition.
Tiny Practice
Put these messages in the order you want them to run.
Starter template
print("Step 1")
print("Step 2")Line-by-line explanation
- The first line runs before the second.
- Both lines display text.
Hint
- Read from top to bottom.
- Move a line if you want it earlier.
- Run the file to confirm.
Show Solution
print("Step 1")
print("Step 2")Line-by-line explanation
- Step 1 is displayed first.
- Step 2 is displayed second.
- This is straight-line control flow.