Re: [Tutor] Python Help - How to end program

2010-07-29 Thread Alan Gauld
"Jason MacFiggen" wrote Python keeps looping when it gets past the int 0, how do I end the program when it the int 0 or > 0. while True: if mo_hp < 0: print "The Lich King has been slain!" elif my_hp < 0: /etc... When using a while True loop you need ttto have a

Re: [Tutor] Python Help - How to end program

2010-07-28 Thread Mark Tolonen
"Jason MacFiggen" wrote in message news:aanlktinevw8zje7fxktomks+tbrp=trmb7sb7pbkt...@mail.gmail.com... Python keeps looping when it gets past the int 0, how do I end the program when it the int 0 or > 0. my_hp = 50 mo_hp = 50 my_dmg = random.randrange(1, 20) mo_dmg = random.randrang

Re: [Tutor] Python Help - How to end program

2010-07-28 Thread Benjamin Castillo
Jason   Are you trying to prevent negative numbers?   Ben --- On Wed, 7/28/10, Jason MacFiggen wrote: From: Jason MacFiggen Subject: [Tutor] Python Help - How to end program To: tutor@python.org Date: Wednesday, July 28, 2010, 9:01 PM Python keeps looping when it gets past the int 0, how

[Tutor] Python Help - How to end program

2010-07-28 Thread Jason MacFiggen
Python keeps looping when it gets past the int 0, how do I end the program when it the int 0 or > 0. my_hp = 50 mo_hp = 50 my_dmg = random.randrange(1, 20) mo_dmg = random.randrange(1, 20) endProgram = end() while True: if mo_hp < 0: print "The Lich King has