Joal Heagney wrote:
Steve Holden wrote:
I suppose this would be far too easy to understand, then:
pr =['Guess my name', 'Wrong, try again', 'Last chance']
for p in pr:
name = raw_input(p+": ")
if name == "Ben":
print "You're right!"
break
else:
print "Loser: no more tries for you"
reg
Steve Holden wrote:
Joal Heagney wrote:
Bengt Richter wrote:
On Fri, 01 Apr 2005 07:46:41 GMT, Joal Heagney <[EMAIL PROTECTED]>
wrote:
Oh goddammmni. I seem to be doing this a lot today. Look below
for the extra addition to the code I posted.
Joal Heagney wrote:
Here's my contribution anyc
Joal was right. It is a bit beyond me. But I appreciate your response.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for your reply.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for your input.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for your help.
It is much appreciated.
--
http://mail.python.org/mailman/listinfo/python-list
Joal Heagney wrote:
Bengt Richter wrote:
On Fri, 01 Apr 2005 07:46:41 GMT, Joal Heagney <[EMAIL PROTECTED]>
wrote:
Oh goddammmni. I seem to be doing this a lot today. Look below
for the extra addition to the code I posted.
Joal Heagney wrote:
Here's my contribution anycase:
count = 0
# Get
Bengt Richter wrote:
On Fri, 01 Apr 2005 07:46:41 GMT, Joal Heagney <[EMAIL PROTECTED]> wrote:
Oh goddammmni. I seem to be doing this a lot today. Look below for
the extra addition to the code I posted.
Joal Heagney wrote:
Here's my contribution anycase:
count = 0
# Get first input
name = ra
On Fri, 01 Apr 2005 07:46:41 GMT, Joal Heagney <[EMAIL PROTECTED]> wrote:
>Oh goddammmni. I seem to be doing this a lot today. Look below for
>the extra addition to the code I posted.
>
>Joal Heagney wrote:
>>
>> Here's my contribution anycase:
>>
>> count = 0
>> # Get first input
>> name =
Oh goddammmni. I seem to be doing this a lot today. Look below for
the extra addition to the code I posted.
Joal Heagney wrote:
Here's my contribution anycase:
count = 0
# Get first input
name = raw_input("Guess my name: ")
# Give the sucker two extra goes
while count < 2:
# Check the val
Ben wrote:
This is an exercise from the Non-programmers tutorial for Python
by Josh Cogliati.
The exercise is:
Write a program that has a user guess your name, but they only get 3
chances to do so until the program quits.
Here is my script:
--
count = 0
name = raw_input("Gue
On 31 Mar 2005 20:03:00 -0800, "Ben" <[EMAIL PROTECTED]> wrote:
>Could someone tell me what is wrong and give me a better alternative to
>what I came up with.
Seperate you raw input statements from your test. Your elsif is
skipping over it.
Try using only one raw imput statement right after y
Ben wrote:
This is an exercise from the Non-programmers tutorial for Python
by Josh Cogliati.
The exercise is:
Write a program that has a user guess your name, but they only get 3
chances to do so until the program quits.
Here is my script:
--
count = 0
name = raw_input("Gue
This is an exercise from the Non-programmers tutorial for Python
by Josh Cogliati.
The exercise is:
Write a program that has a user guess your name, but they only get 3
chances to do so until the program quits.
Here is my script:
--
count = 0
name = raw_input("Guess my
14 matches
Mail list logo