Am I dumb ? Help me..plz


#1


name = raw_input("What is your name?")
quest = raw_input("What is your quest?")
color = raw_input("What is your favorite color?")

print "Ah, so your name is %s, your quest is %s, " \
"and your favorite color is %s." % ("name", "quest", "color")

Above my coding keep make just one sentence, not three sentence.
Is there any error in my coding?


#2

Hi this part

...% ("name", "quest", "color")

Remove The " " around "name", "quest", "color" because It make Them strings


#3

I tried that but It was still same error..just one sentence...


#4

But it's normale that it give You Just one sentence since You Just got one...
so You get something like that

"Ah, so your name is wiz, your quest is coding, and your favorite color is blue."

#5

Can I ask one more time ?

I removed the " " and then run my below code.

name = raw_input("What is your name?")
quest = raw_input("What is your quest?")
color = raw_input("What is your favorite color?")

print "Ah, so your name is %s, your quest is %s, " \
"and your favorite color is %s." % (name, quest, color)

But result was

======================= RESTART: D:/user/Desktop/03.py =======================
What is your name?

There is just one sentence..
I am stuck like that....

Can you help me ?


#6

the What is your name? is the string from this line

name = raw_input("What is your name?")

so when you see it you should type your name in the console(it's waithing you to respond the question) then press Enter the it will aske you

What is your quest?

then you should write in your quest the do the same for the color


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.