🌟 Python Basics: Welcome to Python’s Playground!

Imagine you’re the boss of a team of robot friends, and you want to tell them what to do. But robots don’t understand English, Igbo, Yoruba or Hausa—they understand a special kind of language. That language is Python!
Let me take you through 4 magical tools every junior Python coder needs: Variables, Expressions and Statements, Comments, and Indentation.
📦 1. Variables — Labeled Boxes for Your Stuff
Let’s pretend you have a big shelf of boxes at home. You can write labels on the boxes like “Snacks”, “Toys”, or “School Stuff”. In Python, we call those variables.
A variable is just a name for a box where we keep something like a word or a number.
🔹 Let’s try this:
name = "Roger"
age = 8
Now the computer has a box labeled name and it’s holding "Roger" inside. It also has another box labeled age with 8 inside. Cool, right?
❗ Important Rule: You can’t start your box name with a number.
123namewon’t work. Butmy_nameorname123will.
🧮 2. Expressions and Statements — Answers vs Actions
Let’s say you have a small calculator. You press 2 + 3, and it shows you 5. That’s an expression — because it gives you an answer.
In Python:
2 + 3       # This is an expression
But when you tell the computer what to do, like “Show me what’s in the name box”, you write:
print(name)  # This is a statement (an action)
Think of it like this:
- Expressions = Answers
 - Statements = Instructions
 
Here’s another one:
favorite_color = "blue"  # Statement (telling the computer to remember this)
📝 3. Comments — Secret Notes for You, Not the Robot
Let’s say you’re writing down your plan to build a LEGO house. You might scribble on the side:
“This wall needs to be tall.”
That’s a comment. In Python, you write it with a # mark. Like this:
# This program says hello
print("Hello, friend!")
The robot (computer) will ignore the comment. It’s like a secret note just for you and your fellow humans.
🧊 4. Indentation — Grouping Code Neatly
Now imagine building a story where everything under a chapter is slightly pushed in. That way, you know it belongs to that chapter. Python does the same thing using indentation.
We’ll see this more when we do “if this happens, do that” kinds of coding, but here’s a simple peek:
if age > 7:
    print("You're old enough to start coding!")
That space before print? That’s indentation. Python uses it to know that print("...") is part of the “if” rule above it.
If you don’t indent when you’re supposed to, Python throws a mini-tantrum:
IndentationError: expected an indented block
So keep your code neat and lined up like a marching band. 🥁🎺
🎉 Summary: You Now Know...
| Concept | What It Means | Example | 
|---|---|---|
| Variable | A box with a name that holds data | name = "Roger" | 
    
| Expression | Something that gives an answer | 2 + 2 → 4 | 
    
| Statement | An instruction for the computer | print(name) | 
    
| Comment | A note the computer ignores | # This is a comment | 
    
| Indentation | Tells Python which instructions go where | if age > 7: (then indent) | 
    
✅ Practice Time! Can You Try These?
- Write a Python statement that stores the number 
10in a variable calledscore. - Create a variable called 
foodand store"rice"in it. - Write a 
printstatement to show what’s inside thefoodbox. - Add a comment above your print statement saying “This shows my favorite food”.
 - Which of these will cause an error?
A. 
my_name = "Ada"B.123score = 100C.color_of_car = "red"