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
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
Invc.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Bl u
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Ce xnocr u
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
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.
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
Hi,
I know practically nothing about python. I know how to install it and all
that kind of stuff. I want to use python for parsing a text file. The task
is to read in a text file, and write out another text file that is written
in some particular way using the data from the file that was read in.
Dear Dat,
Sorry for the late reply.
The path of the python should be #!/usr/bin/python (or) #!/usr/bin/env
python. Forward Slash(/) is missing in your CGI script.
Enable the ExecCGI for your DocumentRoot
Ref:
http://httpd.apache.org/docs/current/howto/cgi.html
Options +ExecCGI
Kin
On 26/06/13 18:05, Makarand Datar wrote:
I know practically nothing about python. I know how to install it and
all that kind of stuff. I want to use python for parsing a text file.
So far so good. Do you know how to program in any other language?
It will help us direct you to a source if we kn
On 26/06/13 10:56, Wanbo Li wrote:
Dear all,
I am trying to install BTrees package on Mac OS X 10.7.5. And my python version
is 2.7.3
So I used 'easy_install ZODB' and 'easy_install BTrees' to install the packages.
This list is for people learning the Python language and its standard
librar
I have a small problem with the while function.It prints an odd variable that
has nothing to do with the function. It prints "Squad One!". Here is my code
for the 3 def's that have something to do with the while function.
def tcombat():
c1am=10
c2am=10
enam="Qasi"
ehealth=15
On 27/06/13 03:05, Makarand Datar wrote:
Hi,
I know practically nothing about python. I know how to install it and all
that kind of stuff. I want to use python for parsing a text file. The task
is to read in a text file, and write out another text file that is written
in some particular way usin
On 06/26/2013 08:32 PM, Jack Little wrote:
I have a small problem with the while function.It prints an odd variable
What variable is that?
that has nothing to do with the function. It prints "Squad One!". Here is my
code for the 3 def's that have something to do with the while function.
On 27/06/13 10:32, Jack Little wrote:
I have a small problem with the while function.It prints an odd variable that has nothing
to do with the function. It prints "Squad One!". Here is my code for the 3
def's that have something to do with the while function.
But you don't actually show us th
On Wed, Jun 26, 2013 at 1:45 PM, kdarroud wrote:
> In our Windows machine, we have several windows open.
> Using Python, how can I type 'h', 'e', 'l', 'p', 'Enter' in a specific
> window that is open?
>
In general, Python out-of-the-box doesn't know about OS-specific things
like interacting with
16 matches
Mail list logo