Lesson 6 of 12

Working with Strings 🔠

🎯 Grades 6–8 ⏱ ~25 minutes 💚 Intermediate

What You'll Learn

  • Concatenate strings with + and use f-strings
  • Use common string methods: upper, lower, len, replace
  • Access individual characters with indexing
Quick Check

1. How do you insert a variable into an f-string?

AUse + to join it
BWrap it in {curly braces}
CUse a # before the variable

2. What does .upper() do to a string?

AMakes it lowercase
BCounts the characters
CConverts all letters to UPPERCASE

3. What does len('Hello') return?

AHello
B5
C1

4. Which correctly builds an f-string with a variable called city?

Af"I live in city"
Bf"I live in {city}"
C"I live in " + {city}