[Tutor] Please help me to see what's wrong with the code (original) (raw)
Alan Gauld alan.gauld at blueyonder.co.uk
Sun Jul 25 10:43:09 CEST 2004
- Previous message: [Tutor] Please help me to see what's wrong with the code
- Next message: [Tutor] Re: Converting month names to abbreviated form
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
word = [] function = None while function != "0":
entry = rawinput("enter function: ")
function = raw_input(...)#continue the game if function == "0": print "Welcome to word game 2.0" #add word to the list elif function == "1": add = rawinput("Please add word: ") new = (add) word.append(new) Does anybody know what is wrong with the code.
You never modify function, it is permanently set to None...
Also what is the new=(add) line supposed to do? The parens are pointless and you could just append add directly?
Alan G.
- Previous message: [Tutor] Please help me to see what's wrong with the code
- Next message: [Tutor] Re: Converting month names to abbreviated form
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]