This is the part of my code i need help with:
if done==0 or done== undefined:
The best, most pythonic way is to initialize
done at the very beginning to something that is clearly meaningless. Then you can test for that meaninglessness. The pythonic way is
done = None
None is a special value that means nothing meaningful. In other words, that is (or can be) Python for "undefined." After that is done, you may assign
done to zero in some circumstances. You would then later test
if done == 0 or done is None: print("Good job!")
For more about
None, see this page.
If you really, really must leave
done completely undefined and then test for that, you can use an exception. But I don't recommend it.