String Formating With %, Part 2 help please


#1



String Formating with %, Part 2


File "python", line 6
"and your favorite color is _%s__." _%__ (name, quest, color)
^
SyntaxError: invalid syntax


not sure


Replace this line with your 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)


#2

_%__ (name, quest, color) // remove _ before  and after %

should look like

 % (name, quest, color)

#3

thank you for your help!


#4

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