Learn
String variables are used to track sequences of characters (letters, spaces, numbers, or symbols).
Let’s say we want two variables to hold parts of an a
line1 = "123 Main Street" city = "New York City"
Strings often have the ability to combine with other strings, which is called concatenation. Let’s combine the parts of our address.
print(line1 + ", " + city) # Outputs 123 Main Street, New York City
Now we know how to work with strings and numbers, let’s move onto variables that can help us with our logic.
Instructions
Set the winMessage
variable to a string of your choice, then move Codey to the goal to see it displayed.
Hint
The winMessage
can be found from the set command’s dropdown menu. Type the new message in the teal box that says String. After setting the message, Codey should go down and to the right.
Solution
Here is one possible solution
Set winMessage to You Win! Move Right Move Right Move Right Move Down
Take this course for free
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.