dimanche 6 novembre 2016

Pyscripter: How do I use if statements with an undefined variable?

This is the part of my code i need help with:

if done==0 or done== undefined:
    print("Good job!")

I made another "If" statement earlier where I give "done" a value, but if it was not given a value, (there is no input) and i want the code to be "if 'done' is 0, or 'done' is undefined" do what ever, for example print "Good job!" if it 'done' 0 or undefined

Is there a way I could do this? Any help would be very much appreciated!

Aucun commentaire:

Enregistrer un commentaire