[Tutor] Please help me to see what's wrong with the code (original) (raw)
Don Arnold darnold02 at sprynet.com
Sun Jul 25 10:01:58 CEST 2004
- Previous message: [Tutor] Please help me to see what's wrong with the code
- Next message: [Tutor] Please help me to see what's wrong with the code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Your input variable is entry, not function.
-----Original Message----- From: tutor-bounces at python.org [mailto:tutor-bounces at python.org] On Behalf Of ivan low Sent: Sunday, July 25, 2004 3:04 AM To: python Subject: [Tutor] Please help me to see what's wrong with the code
word = [] function = None while function != "0":
entry = raw_input("enter function: ")
#continue the game
if function == "0":
print "Welcome to word game 2.0"
#add word to the list
elif function == "1":
add = raw_input("Please add word: ")
new = (add)
word.append(new)Does anybody know what is wrong with the code. When I enter function #1 I can't access the "please add word" The loop just continue displaying the number I had enter in "entry"
Ivan
Tutor maillist - Tutor at python.org http://mail.python.org/mailman/listinfo/tutor
- Previous message: [Tutor] Please help me to see what's wrong with the code
- Next message: [Tutor] Please help me to see what's wrong with the code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]