Exova Academy

Module 1 — Getting Started with Python · 12 min

Why Python, and How It Works

Julie is an office manager at a small business. Every Monday, she spends forty minutes renaming invoices, sorting her Downloads folder, and copying numbers from one file to another. None of it is hard, but it's slow, repetitive, and easy to get wrong. One day, a coworker shows her a twenty-line script that does the same job in two seconds. Julie isn't a developer and has no plans to become one: she just wants her Monday mornings back.

That's exactly what this mini-course is about. In roughly two hours, you'll write your first lines of Python and finish with a real script that automatically tidies up a cluttered folder. No pointless theory: every lesson gives you a building block you'll need for the final result.

Why Python rather than another language

There are hundreds of programming languages. Python has become the go-to choice for beginners and non-programmers for three simple reasons.

First, it reads almost like plain English. An instruction like if amount > 100: makes sense without any training. There are no curly braces, no semicolons, no complicated declarations: indentation (the space at the start of a line) is all it takes to structure your code.

Second, it's versatile. The same language can automate files, read Excel spreadsheets, send emails, query a website, analyze data, or drive an AI model. What you learn today stays useful whatever your job is.

Finally, it's free and has outstanding tooling. Hundreds of thousands of libraries (ready-made toolkits) exist for just about any need. When you run into a problem, someone has almost always solved it already and written it up.

How Python works

A computer only understands very basic instructions. Python acts as a translator: you write readable text, and a program called the interpreter reads it line by line, translates it, and runs it right away. If a line contains an error, the interpreter stops and tells you where the problem is.

%% titre: From written code to displayed result
%% narration: This diagram shows the journey of an instruction: you write readable code, the Python interpreter reads it line by line, then the computer runs it and displays the result, or a clear error message if something is wrong.
flowchart LR
  A["You write code"] --> B["Python interpreter"]
  B --> C{"Line is valid?"}
  C -- "yes" --> D["Execution"]
  D --> E["Result displayed"]
  C -- "no" --> F["Error message"]
  F --> A
From written code to displayed result

This "write, run, fix" loop is the heart of a programmer's work. An error isn't a failure: it's information. Experienced developers see dozens of them every day.

There are two ways to talk to the interpreter:

  • the interactive console, where you type a line and get the answer immediately, perfect for testing an idea;
  • a script, meaning a text file ending in .py that contains several instructions run one after another. That's what you'll write starting in the next lesson.

Your first instructions in the console

If Python is already installed on your computer, open a terminal (Command Prompt or PowerShell on Windows, Terminal on macOS) and type python (or python3 on macOS and Linux). If nothing starts, don't worry: the next lesson walks you through the installation, and in the meantime you can use the official online console on python.org (the "Launch Interactive Shell" button).

You'll see three angle brackets >>>: Python is waiting for your instructions. Try this:

>>> 2 + 3
5
>>> 19.90 * 3
59.699999999999996
>>> 100 / 8
12.5
>>> 2 ** 10
1024

A few useful notes. Decimal numbers use a period as the decimal point, never a comma. The result 59.699999999999996 may surprise you: it's how every computer stores decimal numbers, and you'll see later how to round the display cleanly. The ** operator means "to the power of."

Python can also handle text, as long as you put it in quotes:

>>> "Hello Julie"
'Hello Julie'
>>> print("Monday report")
Monday report
>>> "invoice" + "_march"
'invoice_march'
>>> len("invoice_march.pdf")
17

print() displays a message, + joins two pieces of text end to end, and len() counts the number of characters. These words followed by parentheses are called functions: you give them something between the parentheses, they do some work, and they often return a result.

To leave the console, type exit() or simply close the window.

Hands-on practice

Spend ten minutes in the Python console (installed or online) answering these questions from Julie:

  1. She pays for three monthly software subscriptions: $12.99, $29.00, and $7.50. How much does that cost per year?
  2. How many characters are in the file name bank_statement_september_2026.pdf?
  3. Display the message Processing complete with print().
  4. Trigger an error on purpose by typing print("Hello (without closing the quotes or the parenthesis) and read the message you get.
Show solution
>>> (12.99 + 29.00 + 7.50) * 12
593.88
>>> len("bank_statement_september_2026.pdf")
33
>>> print("Processing complete")
Processing complete
>>> print("Hello
  File "<stdin>", line 1
    print("Hello
          ^
SyntaxError: unterminated string literal (detected at line 1)

The parentheses on the first line are essential: without them, Python would only multiply 7.50 by 12, because multiplication comes before addition, just like in math. By the way, the yearly cost of these three small subscriptions, almost $600, is exactly the kind of number you never notice until you actually calculate it.

The error message shows the line involved, points to the spot with a ^, and names the problem: an unterminated string of text. Get into the habit of reading these messages all the way through; the answer is almost always in there.

Key takeaways

  • Python is a readable, versatile, and free language: ideal for automating repetitive office tasks.
  • The interpreter runs your code line by line and stops, pinpointing the first error it runs into.
  • The >>> console is for testing an idea; a .py script is for saving a complete program.

Go further: the full Python course covers these basics in detail, then takes you all the way to automating Excel, email, and the web, and analyzing data with pandas, still following Julie's story. Explore the full course

Enjoyed this lesson?

Unlock all 9 lessons, the quizzes and the certificate.

Buy — $0