Learn
Strings & Console Output
And Now, For Something Completely Familiar

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!

  1. On line 3, create the variable my_string and set it to any string you’d like.
  2. On line 4, use len() to print the length of my_string.
  3. On line 5, print the .upper() case version of my_string.
Folder Icon

Take this course for free

Already have an account?