Problem 2: Demonstrate Out-of-Order Execution Confusion
Easypython
Problem Description
Create a notebook where Cell 1 sets x = 5, Cell 2 prints x, then modify Cell 1 to set x = 10 WITHOUT re-running it, and re-run Cell 2 — observe that it still prints the OLD value, demonstrating why execution order matters.
Input
None (structure the notebook as described).
Output
An explanation (as a Markdown cell) of what value Cell 2 printed and why.
Constraints
- Do not re-run Cell 1 after editing it, as instructed.
Example Input
text(No external input needed)
Example Output
textCell 2 still prints 5, since Cell 1 (now showing x=10) was never actually re-executed.
Concepts Covered
Kernel state, execution order, reproducibility risks.