Lesson 3 of 30
Lesson 03 — Words and funny strings
Title: Build sentences with Python strings
Description: Learn how Python stores words, joins text, repeats text, and puts values inside sentences.
Why it matters for kids: Every game and app needs messages, names, labels, and stories.
1. Strings are text
name = "Mia"
animal = "dragon"
print(name)
print(animal)
print("Python can remember words.")A string is text inside quotes.
2. Join words
first_word = "Super"
second_word = "Coder"
hero_name = first_word + second_word
print(hero_name)Add a space:
hero_name = first_word + " " + second_word
print(hero_name)3. Repeat text
print("ha" * 3)
print("na" * 4 + " Batman!")
print("*" * 10)This is useful for simple patterns.
4. Friendly f-strings
name = "Leo"
age = 9
favorite_food = "pizza"
print(f"My name is {name}.")
print(f"I am {age} years old.")
print(f"I like {favorite_food}.")The {} parts are little windows where Python puts values.
5. Easy examples
pet = "cat"
sound = "meow"
print(f"My {pet} says {sound}.")color = "blue"
thing = "spaceship"
print(f"I have a {color} {thing}.")word = "pop"
print(word)
print(word.upper())
print(word.lower())6. Mini challenge
Click each example to open it.
Example 1
Create name = "Mia" and print it.
Example 2
Create pet = "cat" and print it.
Example 3
Join "Super" and "Coder".
Example 4
Join two words with a space between them.
Example 5
Print "ha" * 3.
Example 6
Make an f-string with your name.
Example 7
Make an f-string with your age.
Example 8
Make a silly sentence about pizza.
Example 9
Print one word in uppercase.
Example 10
Print one word in lowercase.