Part II Q.15: How am I messing up?

  1. name = raw_input(“What is your name?”)
  2. quest = raw_input(“What is your quest?”)
  3. color = raw_input(“What is your favorite color?”)
  4. print “Ah, so your name is %s, your quest is $s,” \
  5. “and your favorite color is %s.” % (name, quest, color)

Okie-dokie, so originally, the areas with the “%s” were blanks you had to fill in with the latter.Done. Did it. But it keeps saying:

“Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: not all arguments converted during string formatting.”

I think it meant the error is in line 6. I’m at a loss, I’ve tried several things. It’s one of those things that I feel so close but and the answer is so simple, but I’m kind of confused right now. Ayudame!


The issue is the dangling escape character. Try removing the quote before the escape (but not the space), and the quote at the start of the next line. That way the escape sequence is contained in the string.


The line-escape is fine. That’s the same string:

print "two strings next to each other" " are simply concatenated"

But there’s a typo in one of the format specifiers, so there are only two of them, but three values are provided (just like the error message says)


I was so distracted by the one thing (fictional) to wholely overlook the other (obvious). Lesson learned. Thank you.