"String Formatting With %, Part 2"


Hello Codecademy Team,

I am currently doing your introductory "Python" programming language course, "String Formatting With %, Part 2" and after answering the three questions, the code keeps running. Could you please help me solve this problem? I would really appreciate it! Thanks!


Ian Michael Jones


This should better illustrate my "Python" program language problem. My syntax states, print "Ah, so your name is %s__, your quest is _%s__, " \ "and your favorite color is _%s__." %. However, the code keeps running.


Ian Michael Jones


Be sure to replace the underscores with %s.

print "Ah, so your name is %s, your quest is %s, \
and your favorite color is %s." % (name, quest, color)


If the program appears to be hanging, then go back to the previous lesson in the hamburger menu, and Submit it and proceed to next lesson. That will start a new session. Submit your exercise again (with any corrections necessary) and it should go through.

 I replaced all of the underscores with "%s." I will try your suggestion.


After trying your suggestion it comes up with an error after I answered the three questions in "". "Error Line 6." Please Help!


The dot is a full stop in the text, not part of the %s syntax, so you know. I tested the earlier example with success, so don't have any further suggestion.


My code syntax was the same as yours, but after I ran the code, it says, "Not enough arguments in the s string." Please advise.


Please show us your code, again. Thanks.


print "Ah, so your name is _%s__, your quest is _%s__, " \
"and your favorite color is _%s__." %__ (name, quest, color)


Hey @dio123,

To clarify the syntax,

name = "Mike"
print "%s" % (name)

From above you can see that the %s in the double quotes will be replaced by what follows after the % and inside the parentheses.
The output for above would be :


So for this exercise you would need to replace all ___'s (3 underscores) inside the double quotes with a %s. And the ___'s (3 underscores) outside the double quote with %.
So the final output should display

Ah, so your name is myname, your quest is myquest, and your favorite color is mycolor.

Hope this clarifies your doubt.


after submitting, its hanging for ever


How long should i wait after submiting


Assuming your code is correct it shouldn't be any time at all. Please post your code, any error messages, and a link to the actual exercise. Thank you.


What is your name?

this is what i get when i replace the underscores with %s and %


Still could use a link to this exercise. We need to be on the same page.


i have been on this all day. my very first time to program.
i really need help


Is this the exercise you are working on?



yes. that is the exercise


Post your code please :slightly_smiling: