I once had a programming student do this sort of thing:
done = False
step = 1
while not done:
if step == 1:
# ... do something ...
step = 2
elif step == 2:
# ... do something else ...
step = 3
# ... and so on ...
Effectively he'd reinvented state machines!