Re: [Tutor] Repeat Until Dead

2013-06-26 Thread Alan Gauld
On 26/06/13 23:07, Danilo Chilene wrote: Hello, Try something like this: coin = raw_input('Insert coins:\n') while(coin > 0): coin = int(coin)-1 print 'You have {0} coin(s)'.format(coin) Note you did not convert the original raw_input value to an int. Also you keep on converting co

Re: [Tutor] Repeat Until Dead

2013-06-26 Thread Danilo Chilene
Hello, Try something like this: coin = raw_input('Insert coins:\n') while(coin > 0): coin = int(coin)-1 print 'You have {0} coin(s)'.format(coin) $ python teste.py Insert coins: 2 You have 1 coin(s) You have 0 coin(s) On Wed, Jun 26, 2013 at 3:30 PM, Chris “Kwpolska” Warrick < kwpol.

Re: [Tutor] Repeat Until Dead

2013-06-26 Thread Marc Tompkins
On Wed, Jun 26, 2013 at 11:23 AM, Jack Little wrote: > In a combat system, how would I have a certain raw_input repeat until the > enemy is dead? > Sounds like a classic case for a "while" loop. ___ Tutor maillist - Tutor@python.org To unsubscribe or c

[Tutor] Repeat Until Dead

2013-06-26 Thread Jack Little
In a combat system, how would I have a certain raw_input repeat until the enemy is dead? Thanks a ton, Jack___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor