15 String Formatting with %, Part 2

<Below this line, add a link to the exact exercise that you are stuck at.>
https://www.codecademy.com/courses/python-beginner-sRXwR/3/4?curriculum_id=4f89dab3d788890003000096#
<In what way does your code behave incorrectly? Include ALL error messages.>
Oops, try again.
Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: name ‘s’ is not defined

<What do you expect to happen instead?>

it’s not taking the color name plz help



Replace this line with your code. Do not remove the backticks that are above or below this line.
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)

Try reseting the code, and trying again, because there is nothing wrong with that code, and it works for me.

Doesn’t work for me neather…

@boynamedniki As I said before, “Try resetting the code and trying again, because there is nothing wrong with that code.”

I now now what whent Wrong: didn’t erase the underscore…

i reset the code like 6 times already and i get this
Traceback (most recent call last):
File “python”, line 6, in
TypeError: unsupported operand type(s) for &: ‘str’ and ‘tuple’

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 ___, your quest is ___, "
“and your favorite color is ___.” %s (name, quest, color)

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)

god luck.

when it says the first thing in the consel like your name you must type your name then repeat with the next 2 things it prints in the consle

what does raw_input denote here?

This topic is old and now closed, if you still have questions make a new topic with your question. Use the template to make it a good topic