Im stuck on strings and console output 2


Im completely stuck


Hi try to post your code and the error that you got.


Assuming that ‘strings and console output2’ stands for activity 2, Practice and you absolutely don’t know what to do then you should review some of the previous lessons on variables.
To (re)assign a value to a variable simply just type:

name_of_variable = the_new_value

so to set the phrase (value), “Graham” to the variable, ‘caeser’ you simply type:

caeser = “Graham”


I did and it didn’t work


Hi can you post your code and the eror you have?


My solution after googling. I’ve only replaced %s with {x} and % at the end with .format.

EDIT: It now worked for me with %s. Odd…


Hey I am stuck too. Tried to apply the code you gave and it gives me this error " Oops, try again. Did you use %s in your code?" Do you know why ?


You’re supposed to use %s in your code that’s why.

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)

This then worked for me. My first solution wasnt the solution they wanted to have.