String Formatting with %. part 2


I am getting an error for line 2 and I’m not sure why. My code and the error message is pasted below. Wil someone please help me with this one?

name = (Nikaela)
quest = (to learn Python)
color = (some shade of gray)

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

File “python”, line 2
quest = (to learn Python)
SyntaxError: invalid syntax


The exercise is wanting you to type in your answers using raw_input to prompt through the terminal like this:

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

That part of the code was provided to you.


Never mind. Got it. Thanks!


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