the GUI is well closed, but it never prints "done" and the program never terminate.
on line 26, move print()
command inside while/else
condition.
Snippet:
while not tk.done():
tk.spot( random.randint( 0,800 ),random.randint( 0,600 ))
print('done')
Output:
done
done
done
done
exit loop