Problem with raw_input()


name = raw_input("Enter name:")
quests = raw_input("Enter quests:")
color = raw_input("Enter color:")

After name is input, i input quests, but blank is recored for quests, and also for color. In conclusion, only value of first raw_input() is recorded. What problem here?


Are you sure the value of quests and color aren't being recorded? Try printing each variable after the raw_inputs to check if there's a value in them.


I printed them, but they are blank, except value of name.


So along with the above you have something like

print("The quest is: %s, Your Name is: %s, The Color is: %s" % (quests, name, color)

After all those inputs to see what is stored?

[quote="zeziba, post:4, topic:8357"]
print("The quest is: %s, Your Name is: %s, The Color is: %s" % (quests, name, col

Yes, I did. But values of quests and color are blank.
Ok, forget about above commands. Let try with below:

if answer == "left" or answer == "l":
    print "This is the Verbal Abuse Room, you heap of parrot droppings!"
elif answer == "right" or answer == "r":
    print "Of course this is the Argument Room, I've told you that already!"
    print "You didn't pick left or right! Try again."


I run above command. First,I input blank. The second time, I input "left". But it asks me "You didn't pick left or right! Try again". So I thought from the second time, raw_input() records blank no matter what first recored value is. But this does not occurs 100%, only when I Save and Submit Code from the second time.


Change your code to

name = raw_input("Enter name:\n")
quests = raw_input("Enter quests:\n")
color = raw_input("Enter color:\n")

That way after each question there is a line break so you can ensure you are actually typing in something.