Predict

What Changed This Turn?

A game's state is everything that can change while you play: where Pip is, what's in the backpack, how much lantern fuel is left. Each command changes some of the state, or none of it.

Trace this short expedition one command at a time.

MOVES = {"north": (-1, 0), "south": (1, 0),
         "east": (0, 1), "west": (0, -1)}
pos = (1, 1)
items = []
fuel = 3

for cmd in ["east", "take", "dance", "south"]:
    if cmd in MOVES:
        d_row, d_col = MOVES[cmd]
        pos = (pos[0] + d_row, pos[1] + d_col)
        fuel -= 1
    elif cmd == "take":
        items.append("shell")

print(pos, items, fuel)

What does this program print?