Im stuck on strings and console output 2


#1

Im completely stuck
:laughing:


#2

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


#3

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"


#4

I did and it didn't work


#5

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


#6

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..


#7

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 ?


#8

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.