x=2, y=7, z=3, x=6, y=1, z=0, y=4

Check the final answer first, then review the worked steps.

Answer

\(x = 6, y = 4, z = 0\)

Work

x: 2 -> 6
y: 7 -> 1 -> 4
z: 3 -> 0

Step-by-step solution

  1. Track the value of each variable line by line as the code executes.
  2. Initial assignments: $x = 2$, $y = 7$, $z = 3$.
  3. Update variables: $x$ becomes $6$, $y$ becomes $1$, $z$ becomes $0$.
  4. Final update: $y$ is reassigned to $4$.
  5. The final values are $x = 6$, $y = 4$, and $z = 0$.