📘 Chapter 1: Introduction to Python
What Is Python?
Python is one of the easiest and most powerful programming languages in the world.
It is used for:
● Web development
● Mobile apps
● Data science & AI
● Automation
● Games
Python is popular because:
● It is simple to read
● It works on all devices
● It has millions of free tools and libraries
Why Learn Python?
Python can help you:
● Build apps fast
● Automate boring tasks
● Work in high-demand tech jobs
● Create websites and games
● Start freelancing or online businesses
Python is perfect for beginners because you can start writing useful code on day one.
,Installing Python
To write Python code, you need Python installed on your computer.
Windows
1. Visit: python.org/downloads
2. Download Python 3
3. Click Install
4. Check the box “Add Python to PATH”
Mac
Python usually comes pre-installed.
To install the newest version:
1. Go to python.org/downloads
2. Download the Mac installer
3. Install normally
Chromebook
Use Replit.com or Google Cloud Shell (no installation needed).
Phone (Android/iPhone)
Use apps like:
● Pydroid 3
● Pythonista
● Replit (browser)
Your First Python Program
Type this code:
print("Hello, world!")
This is the most famous first program.
It tells your computer to display the message “Hello, world!”.
,What You Should See:
Hello, world!
How Python Works (Simple Explanation)
Python reads your code from top to bottom.
Example:
print("Line 1")
print("Line 2")
Output:
Line 1
Line 2
You can think of Python like giving instructions to a smart robot.
EXERCISES (Chapter 1)
1. Write your own message
Use print() to show your name.
Example:
print("My name is ____")
2. Print two messages
Print your name on the first line and your age on the second line.
, 3. Create your first mini-project
Write a Python program that prints:
Welcome to Python!
Let's start learning.
📘 Chapter 2: Python Variables & Data
Types
Python uses variables to store information.
A variable is like a labeled box where you keep data.
1. What Is a Variable?
A variable is a name you give to a value.
Example:
name = "Sarah"
age = 20
country = "Cameroon"
Here:
● name stores a text
● age stores a number
● country stores a text
You can print variable values like this:
print(name)
print(age)
print(country)