Lesson 15 – Joining Strings

Combining Text in Python

Numbers can be added together.

But text behaves differently.

When you use the + operator with text, Python joins the pieces together instead of performing maths.
This process is called concatenation.

Concatenation simply means:
Joining pieces of text into one larger sentence.
Example:

title = "Level "
number = "60"
result = title + number
print(result)
Output:
Level 60
Notice that if we want spacing between words, we must include the space ourselves.

For example:

word1 = "Death"
word2 = "Knight"
print(word1 + " " + word2)
In World of Software Engineering, we now have two players in a 1v1 fight!

We need to tell each player how much health they have remaining.
Your Task:

1. Use string concatenation to print Player 1's health.
2. Use string concatenation to print Player 2's health.

The final output should read exactly:

Player 1 you have 1200 health
Player 2 you have 1100 health
Use string concatenation
sentence_start = "You have "
sentence_end = " health"

player1_health = "1200"
player2_health = "1100"

# Don't edit above this line

print()
print()