Learn
Great job! You’ve learned a lot in this unit, including:
Three ways to create strings
'Alpha' "Bravo" str(3)
String methods
len("Charlie") "Delta".upper() "Echo".lower()
Printing a string
print "Foxtrot"
Advanced printing techniques
g = "Golf" h = "Hotel" print "%s, %s" % (g, h)
Instructions
1.
Let’s wrap it all up!
- On line 3, create the variable
my_string
and set it to any string you’d like. - On line 4, use
len()
toprint
the length ofmy_string
. - On line 5,
print
the.upper()
case version ofmy_string
.
Take this course for free
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.