1. Your first Python program
A program is a set of instructions you give to a computer. Just like you might write a recipe for injera — "mix teff flour, add water, ferment for two days, then bake" — a computer program is a recipe the computer follows step by step.
Python is one of the most popular programming languages in the world. It is used by companies, scientists, and beginners alike because its instructions look almost like plain English. If Abebe can read a recipe, Abebe can learn Python.
Every programmer's journey begins with the same program — it tells the computer to display a message on screen. Here is what that looks like in Python:
print("Hello, World!")
When you run this one line, the computer shows:
Hello, World!
That is it. You just wrote a Python program. The word print is a built-in Python command that means "show this text on screen". The text you want to show goes inside the parentheses, surrounded by quotation marks.
Where do you actually write and run Python? You have three easy options:
1. Online (no installation needed) — visit python.org/shell or replit.com in any web browser. Type your code and press Run. This is the fastest way to start.
2. IDLE — a simple editor that comes bundled with Python when you install it on your computer (free download at python.org).
3. VS Code — a popular, free editor used by professional developers. Once Python is installed, VS Code makes it easy to run your files.
For this course, the online option is perfect. Sara, who runs a small electronics shop in Merkato, started learning Python on her phone's browser during slow hours — no laptop needed.
You are not limited to "Hello, World!". You can print any text you like:
print("Selam, Addis Ababa!")
print("My name is Almaz.")
print("1 birr = 100 santim")
Each print() call displays one line. If you write three print() calls one after another, you get three lines of output. Try changing the message to your own name or city!
Notice that numbers inside quotation marks are treated as text. If you write print("100"), Python shows the characters 1, 0, 0 — it does not do any maths. You will learn how to work with actual numbers in the next lesson.
Python lets you add notes inside your code using the # symbol. Anything on a line after # is called a comment — Python ignores it completely. Comments are for humans, not the computer.
# This program greets the user
print("Selam, Abebe!") # prints a friendly greeting
Comments are your way of explaining what your code does. When you come back to code you wrote a month ago — or when a colleague reads your code — comments save everyone time. Good programmers write comments often.
Scenario
Dawit wrote this Python code and ran it, but he got an error. What is the most likely reason? print("Welcome to TeleBirr!)
Check your understanding
1/7 · 77 XPWhich of the following correctly prints a message in Python?