Learn
Strings & Console Output
Strings
Another useful data type is the string. A string can contain letters, numbers, and symbols.
name = "Ryan" age = "19" food = "cheese"
- In the above example, we create a variable
name
and set it to the string value"Ryan"
. - We also set
age
to"19"
andfood
to"cheese"
.
Strings need to be within quotes.
Instructions
1.
Create a new variable brian
and assign it the string "Hello life!"
.