# Losing Battle # Demonstrates the dreaded infinite loop # Michael Dawson - 1/2/03 print "Your lone hero is surrounded by a massive army of trolls." print "Their decaying green bodies stretch out, melting into the horizon." print "Your hero unsheathes his sword and begins the last fight of his life.\n" health = 10 trolls = 0 damage = 3 while health >0:#!= 0: trolls += 1 health = health - damage print "Your hero swings and defeats an evil troll, " \ "but takes", damage, "damage points.\n" print "Your hero fought valiantly and defeated", trolls, "trolls." print "But alas, your hero is no more." raw_input("\n\nPress the enter key to exit.")