Exercise 2: Tracing sum_evens_goto With n=3 for 4 Jumps — Possible Solution ==================================================================== INITIAL STATE ------------------------------ label = 'LOOP_START', i = 1, total = 0 JUMP 1 (label was LOOP_START) ------------------------------ i=1 is not > n(3), so no jump to END. i=1 is odd (1 % 2 != 0), so: label <- 'SKIP' State after jump 1: label='SKIP', i=1, total=0 JUMP 2 (label was SKIP) ------------------------------ i <- i + 1 = 2 label <- 'LOOP_START' State after jump 2: label='LOOP_START', i=2, total=0 JUMP 3 (label was LOOP_START) ------------------------------ i=2 is not > n(3), so no jump to END. i=2 is even (2 % 2 == 0), so: total <- total + i = 0 + 2 = 2 label <- 'SKIP' State after jump 3: label='SKIP', i=2, total=2 JUMP 4 (label was SKIP) ------------------------------ i <- i + 1 = 3 label <- 'LOOP_START' State after jump 4: label='LOOP_START', i=3, total=2 FINAL ANSWER ------------------------------ After exactly 4 label-jumps: label = 'LOOP_START', and the value of total at that point is 2 (i has reached 3, but the loop has not yet processed it since label is back at LOOP_START, about to check i=3 next). WHY THIS WORKS AS AN ANSWER ------------------------------ The trace follows the exact same jump-by-jump mechanics this chapter's own function definition specifies, applying each conditional check and state update explicitly rather than skipping to the final answer, and correctly stops precisely at jump 4 rather than continuing to the loop's actual completion.