15. String Formatting with %, Part 2



When I submit the code, it starts to compile and execute and then it just gets stuck and it the submit button is stuck on the spinning wheel.
I get a "What is your name?" but nothing else. It wont give me an error or completed. It is just stuck!

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)



Code is correct. Try to refresh the page.


I have, many times and every time I submit it just keeps running it, without completion. I've ended up just skipping the exercise now.


Are you stuck with a spinning gear and it feels like your code is frozen? That's because the code is asking you three questions! Click inside the console window, type in your name, and then press Enter (or Return).


Oh wow!!!! Ok, see the instructions weren't there for that. A huge lapse in understanding.


you could click on Stuck? Get a hint! :slight_smile:


Can someone help me with what exactly it is I'm doing wrong? I know I may not be the smartest guy around, but I can't figure out what I'm doing incorrectly.


you have to use %s to instead of the value.


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

when you ask user you cant say what will be answer.same here .if you yourself print the result so what is the benefit of asking the question ?you have to print the user's answer not your.

make sense :slight_smile:

i hope you've undersatnd.

Always create a new topic.dont post on other's topic.


What part of the code innitlized this que?


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