I don't understand I tried a few things but its still not working.
So the exercise is asking you to change the __ with %s, which are placeholders.
For example if we do:
name = "Ricky"
print "Hello %s." % (name)
The output will be:
Remember what the exercise says: "we used the % operator to replace the %s placeholders"
print "Hello %s." %
And : "with the variables in parentheses."
print "Hello %s." % (name), assigning the variable in the parentheses after the operator % helps python recognize that it's the variable we want to assign inside the string placeholder %s! remember the order inside the parentheses after the operator % is important.
Let me know if you still need any further explanation or anything in general!
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)
So i follow the instructions but after clicking the ' Save & submit ' button it shows an error. The 'Hint' section tells me to type in my name in the console and hit ' enter ' but i can't type anything in the console window. please help me out.
Your code is good, you just forgot to delete the __, delete them all and it should look like:
print "Ah, so your name is %s, your quest is %s, " \
"and your favorite color is %s." % (name, quest, color)
I hope it's clear, let me know if you need any further help or explanation
Thanks a lot . That was a silly mistake
Thanks for the help. Finally figured it out