Boxes and Borders
Draw frames.
Boxes and Borders is a free Coding for Kids lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Coding for Kids learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Build a Box! 📦
Hi artist! 👋 Today we draw boxes and borders to frame our art! 🖼️
Boxes make everything look neat and special! ✨
print("Let's build boxes! 📦")A Top Border ➖
A box starts with a top border made of repeated symbols! ➖
Remember the repeat trick: "-" * 5! 🪄
print("-" * 5)Top and Bottom 🥪
A box needs a top AND a bottom! Like a sandwich! 🥪
print("-----")
print(" ")
print("-----")Add Side Walls 🧱
Now add walls on the left and right with |! 🧱
Now it looks like a real box! 📦
print("-----")
print("| |")
print("-----")Corners with + 🔲
Use + for the corners to make them sharp! 🔲
This is a classic box style! 😎
print("+---+")
print("| |")
print("+---+")A Bigger Box 📐
Make it bigger by adding more dashes and more lines! 📐
print("+------+")
print("| |")
print("| |")
print("+------+")Box with a Loop 🔁
Let's use a loop to make the box as tall as we want! 🔁
The loop draws the side walls!
print("+----+")
for i in range(3):
print("| |")
print("+----+")Put Words Inside 💬
Boxes can hold messages! Let's frame the word HI! 💬
print("+------+")
print("| HI |")
print("+------+")A Box Function 🛠️
Let's make a function that draws a box of any width! 🛠️
Reuse it whenever you want a box! 🔁
def box(width):
print("+" + "-" * width + "+")
print("|" + " " * width + "|")
print("+" + "-" * width + "+")
box(6)Double Borders 🟰
Try = for a fancy double-line look! 🟰
Different symbols give different styles! 🎨
print("========")
print("|| :) ||")
print("========")Box Builder! 🏆
You can frame anything now! 🎉
- Top and bottom borders ➖
- Side walls with
|🧱 - Corners with
+🔲 - Functions for any size 🛠️
Next: drawing a smiley face! 😊
print("I can build boxes! 📦🥇")Quick Check ✅
Let's test your box-building skills! 🧠
Recap Time! 🎒
Great work, box builder! 🌟
- Top/bottom = repeated
-➖ - Walls =
|🧱 - Corners =
+🔲 - Loops make tall boxes 🔁
- Functions reuse your box 🛠️
Next: a smiley face! 😊
print("Boxes and Borders: complete! 🚀")Frequently asked questions
Is the “Boxes and Borders” lesson free?
Yes — the full text of “Boxes and Borders” is free to read here on the web, and the Coding for Kids course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Coding for Kids course, upgrade to CoddyKit PRO.
What will I learn in “Boxes and Borders”?
Draw frames. You practise Coding for Kids with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Coding for Kids?
No prior experience is required. Coding for Kids on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Boxes and Borders” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Coding for Kids lesson?
Yes. Every Coding for Kids lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Drawing with Letters
- Boxes and Borders
- A Smiley Face
- Your Own ASCII Art