String Formatting with %, Part 2


I have an issue that seems to be common on this exercise:

I am receiving the following text and error message in the input/output window:

What is your name?What is your quest?What is your favorite color?Ah, so your name is SCT, your quest is if type(error) == ValueError:, and your favorite color is return "Make sure to use a lowercase “s” with %s. Python told us about the following error: " + str(error).

This occurs when I input the code below and click the “Run” button. Immediately afterwards, the “Run” button grays out and starts processing and does not let me input any values in the I/O window. After a timeout, it gives the above error message. I have reset the exercise, I have refreshed the page, I have closed the browser (Chrome) and reopened it: all with no success. I will try this on a different computer shortly to see if that works for some reason.

Does anyone have any advice? As you know, I am not able to move ahead until this is resolved.

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)


I have the same problem. any help?


So I did solve the issue but I had to use my Macbook. Logged in and used the exact same code that I had used on my PC and it worked just fine. I have a feeling some run-time error happened on the page and it was cached in memory. I don’t know how else to explain it. Hopefully you have a different computer and can try this.


Remove the backslash and combine the two strings to one. Else the summon of inputs does not combine with the %s


The slash doesn’t make a difference as it is just escaping the break to a new line as designed. Plus, I had already tried this and had the same error.


Same problem. How can I bypass this exercise?


I am not sure what is going on, but my exercise is now solved and I can move on.
Strange…I was not able to type in interpretor…


Hi @zigbaird, are you still having issues with this lesson? :thinking:


No - in my second post above, I explained how I solved it by doing the exact same process on a different computer. It seems to be a bug in the program since it is commonly occurring with quite a few users.


The first two answers you enter, you simply type in the answer and hit enter. As for the third question you enter your answer differently, this time you you can trick the console type " before your color and "after your color. example: What is your name? Mike What is your quest? %s What is your favorite color? “Green” . (See the double quotes?)


That might work for some. In my issue, I was not able to enter any input at all.,


What browser are you using?


I was using Chrome on my PC running Windows 10. When I switched to my Mac and made it work, I was also using Chrome.


Hi @bitmaster17522,

Thank you for your advise, but I was not able to type anything at all. After pressing run in about 30s all the text was automatically displayed and i was unable to type anything.

To pass the exercise i tried several tricks…going back to the beginning of the lesson, restarting exercise several times, changing name = raw input to name = “name”…so i am not sure, which solution helped me move on, without executing exercise properly.


Any solutions? I cannot move on without completing!


That’s the same issue I had. If you have access to another computer, I would try that and see if it works as that’s I was able to progress. Other then that, you could also try to empty your browser cache and see if that helps.


I will also add that after I used another computer to progress to the next question, I was able to go back to the original computer and move forward. However, a few questions later, I ran into the same issue. Long story short, I won’t be upgrading my account as I believe this to be a program bug and I really don’t have the time to deal with that.


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