Fill in

Gluing Words Together

Text in Python is called a string (think of letters strung together like beads). Strings can be in "double" or 'single' quotes. Just match them.

+ glues strings together. This is called concatenation:

first = "Lantern"
second = "light"
print(first + second)        # Lanternlight
print(first + " " + second)  # Lantern light

Notice + adds no space for you. You add " " yourself.

* with a string and a number repeats it:

print("ho" * 3)   # hohoho
print("-" * 10)   # ----------

Assignment

Replace each ___ so the program prints:

~~~~~~~~~~~~~~~~
Welcome, Pip the Brave!
~~~~~~~~~~~~~~~~
  1. border should be "~" repeated 16 times.
  2. greeting should glue "Welcome, ", name, " the ", title and "!" together.