By the end of this chapter, learners will:
Python is like the LEGO of programming—simple blocks, endless possibilities.
🧠 Fun Fact: Python was named after Monty Python, not the reptile!
| Field | Example |
|---|---|
| Web Dev | Instagram backend is built with Python! |
| AI/ML | ChatGPT was trained using Python tools! |
| Gaming | Games like Eve Online use Python scripts |
| Automation | Python bots save time by doing repetitive tasks automatically |
Let’s write our first program!
print("Hello, world!")
🎉 You just told a computer to say something. Congratulations—you’re officially a coder!
Variables store data—like containers for info!
name = "Alex"
age = 12
Python comes with types like:
| Type | Example |
|---|---|
| String (text) | "Hello" |
| Integer (whole number) | 15 |
| Float (decimal) | 3.14 |
| Boolean (true/false) | True or False |
is_hungry = True
Use print() to show something in the console.
print("Your age is", age)
Use # to leave notes in your code.
# This is a comment
print("Learning Python is fun!")
Write a short Python script that prints out your “profile card.”
name = "Luna"
age = 13
hobby = "painting"
print("My name is", name)
print("I'm", age, "years old.")
print("I love", hobby + "!")
🎨 Bonus: Add more facts like favorite color, favorite food, or a secret talent!
name = "Zara"
print("Hello " + name)
A. Hello
B. Hello Zara
C. name
D. Error
🕹️ Answer: B
“If you could build anything with Python, what would it be?”
Write 2-3 sentences (or draw it!) about something fun, helpful, or wild you’d want to create.
✅ Python is beginner-friendly, flexible, and everywhere.
✅ You can start coding with just a few lines.
✅ Variables, data types, and print statements are the foundation of your Python journey.
Chapter 2: Control Flow—Ifs, Loops, and Decisions
Get your code thinking and making choices like a real program!
Not a member yet? Register now
Are you a member? Login now