String formatting with %


#1



https://www.codecademy.com/courses/python-beginner-sRXwR/3/4?curriculum_id=4f89dab3d788890003000096#

Hi! I am getting back into trying to learn Python (again) in a crash course for an IT test after having put that off for a couple of months.

Soo...answering the questions of the console goes fine until the third and last question and I am not quite sure where my mistake is.

The red error message after answering the third question says
"Traceback (most recent call last):
File "python", line 6, in
ValueError: unsupported format character ' ' (0x20) at index 22"

I am probably missing something obvious. My bad.

Thank you!


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 %." % (name, quest, color)


#2

The modulo is only an escape character. It still needs a type component.


#3