String Formatting with %. part 2


#1

https://www.codecademy.com/courses/learn-python/lessons/strings--console-output/exercises/string-formatting-with--part--1?action=lesson_resume

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


#2

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.


#3

Never mind. Got it. Thanks!


#4

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