computer4kids is now ComputerLeap. Same free lessons, same team. Read why we changed our name

← All lessons · 🧑‍💻 Coding Academy

💬

🎓

⏱ 15 min

Free

The Talking Computer

Join words together, repeat them and add emojis to make text art.

🎯 What you will learn

  • Join strings with +
  • Repeat strings with *
  • Make fun text art

👋 Let’s get started!

Strings are like word LEGO bricks 🧱. You can snap them together and even copy them! Let’s make the computer chatty.

🪜 Step by step

1. ➕ Joining strings

Use + to glue strings together. Don’t forget spaces!

print("Super" + "star")
print("Hello " + "friend")
2. ✖️ Repeating strings

Use * and a number to repeat a string.

print("ha" * 3)
print("⭐" * 5)
3. 🎨 Text art

Mix them to draw pictures with characters!

print("  /\\")
print(" /  \\")
print("/____\\")

🧪 Try it!

Change the code and press ▶ Run to see what happens. You can’t break anything!

Make a cheer

print("Go " * 3 + "team! 🎉")
print("🌈" * 7)

Build a sandwich of stars

print("⭐" * 3)
print("🍔 burger 🍔")
print("⭐" * 3)

📖 Key words

Tap a card to flip it over!

+ (join)
Glues strings together ➕
* (repeat)
Copies a string many times ✖️
Character
One letter, number or symbol 🔤

🏆 Challenge

Print a row of exactly 10 hearts using *.

Challenge

print("❤️" * 1)

Knowledge Check Quiz

  1. What does this print?
  2. What does this print?
  3. Which symbol repeats a string?
← Previous lesson
Next lesson →