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...@gmail.com> wrote:

> On Wed, Jun 26, 2013 at 8:23 PM, Jack Little <jacklittl...@yahoo.com>
> wrote:
> > In a combat system, how would I have a certain raw_input repeat until the
> > enemy is dead?
> >
> >
> > Thanks a ton,
> > Jack
>
> Something like this:
>
> while enemyalive:
>     raw_input('Action? ')
>
> --
> Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
> stop html mail                | always bottom-post
> http://asciiribbon.org        | http://caliburn.nl/topposting.html
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to