Problem with raw_input()


#1

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?


#2

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.


#3

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


#4

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?


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

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!"
else:
    print "You didn't pick left or right! Try again."
    clinic()

clinic()

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.


#6

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.