Skip to content

What is Python?

4 min read

Before you write any code, it helps to know what you're actually talking to. By the end of this lesson you'll know what a programming language is, how Python reads your code, and what you'll be able to build by the end of this course. You'll also run your first few lines, just to see that it works.

Talking to a computer

A computer is fast and obedient, but it takes everything literally. It won't guess what you meant. To get it to do something, you give it exact instructions, one after another. A list of instructions like that is a .

You can't write those instructions in Amharic or English, because everyday language is full of guesses and shortcuts. Instead you use a : a language small and strict enough for a computer to follow, but still readable by people. Python is one of them.

Here is a tiny Python program. You don't need to understand it yet. Press Run.

print("Selam! Python is working.")
print("Three macchiatos cost", 3 * 45, "birr.")

In the editor, press Escape then Tab to move on.

Two lines of instructions, two lines of results. The second line even did some arithmetic for you: 3 * 45 means three times forty-five. Try changing 3 to 5 and run it again.

How Python reads your code

Your computer's processor doesn't understand Python directly. Something has to translate. Languages handle this in one of two ways.

Some languages are : a tool translates the whole program into machine instructions first, and you run the result later. Python is : a program called the Python interpreter reads your code from the top and carries out each line as it gets there. That's why you can change a line and see the effect a second later, with no build step in between.

You can see this line-by-line reading for yourself. The third line below has a typo. Before you run anything, decide what you'll see.

What will this print?

Decide before you look. Guessing wrong is how this sticks.

print("one")
print("two")
prnt("three")

Python prints

one
two
Traceback (most recent call last):
  File "<your code>", line 3, in <module>
    prnt("three")
    ^^^^
NameError: name 'prnt' is not defined. Did you mean: 'print'?

Python ran lines 1 and 2 before it reached the typo on line 3. Only then did it stop with an error. (One exception: if a line breaks Python's grammar, like a missing quote, Python refuses to start at all. You'll meet that in lesson 0.3.)

Quick check

Python is interpreted. What does that mean for you when you write code?

What Python is for

Python is one of the most used programming languages in the world, and it turns up in very different kinds of work.

  • Web backends. The code behind websites and apps: logging people in, saving data, answering requests. Frameworks like Django and FastAPI are written for Python.
  • AI and machine learning. Most of today's AI tools are trained and served with Python libraries such as PyTorch.
  • Data work. Cleaning spreadsheets, analyzing exam results, drawing charts. Analysts use Python where Excel runs out.
  • Automation. Small scripts that rename a thousand files, send reminders, or collect prices from a website while you sleep.

The same language, the same basics, used in every one of those places. What you learn in the Shallows carries all the way down.

Why start with Python

Python was designed to be read by people. It uses plain words like if, for, and print instead of symbols, and its rules are few and consistent. Compare these two ways of showing a greeting:

Java
public class Main {
    public static void main(String[] args) {
        System.out.println("Selam");
    }
}
Python
print("Selam")

Both do the same job. The Python version lets you focus on the idea instead of the ceremony around it. That matters when you're starting out: fewer rules to fight means more energy for learning how to think in steps.

What you'll build in this course

This course starts in the Shallows, where you're reading now, and goes down through Currents and Deep Water to Landfall, where Python meets the web.

Along the way you'll build one project that grows with you: Birr Ledger, a personal expense tracker. It starts as a short script that records what you spent on coffee and taxis. Module by module it gets tests, classes, type checking, and concurrent downloads of exchange rates, until it's a real Python package ready to become an API in the FastAPI course.

For now, you only need one thing: the next lesson, where you'll install Python on your own computer.

Key takeaways

  • A program is a list of exact instructions; a programming language is how you write them.
  • Python is interpreted: the interpreter reads and runs your code one line at a time.
  • Python is used for web backends, AI, data work, and automation.
  • It reads almost like English, which makes it a strong first language.
  • You'll build Birr Ledger, one project that grows from a script to a package.