On 06/07/13 13:33, Jack Little wrote:
How would I exit a while statement. The while is to keep the player in combat with an enemy until said enemy is dead. I tried using an if, but it just doesn't work.
The devil is in the details, which you do not tell us. How precisely did you use an "if"? Should we guess what you did? If you did this: while fighting: do combat if enemy hit points <= 0: print "Hello!" then naturally it would not work. But if you did this: while fighting: do combat if enemy hit points <= 0: break it will. So the real question is, what did you try? -- Steven _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor