Welcome to the Python Programming course. In this first lesson you'll discover what Python is, where it comes from, what sets it apart from other languages and where it's used today. You'll also write (or at least read and understand) your first line of code, and meet the project that will accompany us throughout the course: Papyrus, a neighbourhood bookshop that wants to digitalize its operations. Understanding the context and philosophy of the language before writing code will help you make better decisions later on, when the code gets more complex.

Contents

  1. What is Python?
  2. A brief history of the language
  3. Key characteristics
  4. What is Python used for in the real world?
  5. Advantages and disadvantages
  6. Your first line of code: print()
  7. The course project: the Papyrus bookshop

What is Python?

Python is a general-purpose programming language: it's used to write anything from small scripts of a few lines to large web applications, data analysis tools or artificial intelligence systems.

Its hallmarks are:

  • Readability: Python code looks a lot like written English. It was designed so that reading it would be almost as easy as reading pseudocode.
  • Simplicity: you can achieve a great deal with very little code. Tasks that take 20 lines in other languages are often solved in 3 or 4 lines of Python.
  • A huge community: millions of programmers use Python, which means abundant documentation, tutorials, and ready-made libraries for almost anything.

To get a feel for that readability, look at this snippet (don't worry about fully understanding it yet; we'll study it piece by piece over the next few lessons):

books = ["Don Quixote", "The Odyssey", "Hamlet"]

for book in books:
    print("Papyrus has in stock:", book)

Even if you've never programmed before, you can probably guess what it does: for each book in the list, it displays a message. That immediate intuition is exactly what Python aims for.

A brief history of the language

  • 1989-1991: Guido van Rossum, a Dutch programmer, creates Python over his Christmas holidays as a personal project. The name doesn't come from the snake, but from the British comedy group Monty Python.
  • 1994: Python 1.0 is released.
  • 2000: Python 2.0 arrives and popularizes the language.
  • 2008: Python 3.0 appears — a version that fixes design flaws but is not compatible with Python 2. Both branches coexisted for years.
  • 2020: Python 2 officially stops receiving support. Today, all new development happens in Python 3, and that's the version we'll use in this course.
  • Today: Python consistently tops the language popularity indexes (such as TIOBE or the IEEE ranking), driven above all by data science and artificial intelligence.

Important: if you ever see code like print "Hello" (without parentheses) in an old tutorial, that's Python 2. Ignore it: in Python 3 it raises an error.

Key characteristics

Let's unpack three terms you'll see constantly when people talk about Python. They're technical concepts, but they're worth understanding from the very start.

Python is interpreted

A computer only understands instructions in machine code (ones and zeros). There are two main strategies for translating a programming language into that machine code:

Strategy How it works Examples
Compiled A program (the compiler) translates all the code at once into an executable before it can be used. C, C++, Go, Rust
Interpreted A program (the interpreter) reads the code and executes it line by line on the fly. Python, JavaScript, Ruby

Python being interpreted has practical consequences:

  • Fast work cycle: you write, run and see the result instantly, with no compilation step.
  • Portability: the same .py file works on Windows, macOS or Linux, as long as a Python interpreter is installed.
  • Slower execution speed: because it translates on the fly, a Python program is usually slower than its C equivalent. For most applications (and certainly for running a bookshop like Papyrus) that difference is irrelevant.
flowchart LR
    A["Source code\n(.py file)"] --> B["Python interpreter"]
    B --> C["Line-by-line execution\n(immediate result)"]

Python is multi-paradigm

A programming paradigm is a style or way of organizing code. Python doesn't force you to use a specific one; it supports several:

Paradigm Core idea Where you'll see it in this course
Imperative/procedural Step-by-step instructions, grouped into functions. Modules 1 to 4
Object-oriented Code is organized into classes and objects that combine data and behavior. Module 5
Functional You work with functions that transform data, avoiding state changes. Lambda functions (module 3), comprehensions (module 2)

This is an advantage for learning: you'll start by writing simple step-by-step scripts, and only when you need to will you make the leap to more advanced techniques.

Python is dynamically typed

In programming, the type of a piece of data indicates what kind of value it is: an integer, a piece of text, a true/false value... In some languages (static typing) you must declare the type of every variable up front and it cannot change. In Python (dynamic typing) that's not necessary:

price = 18          # now it holds an integer
price = "eighteen"  # ...and now a text, without Python complaining
  • Advantage: you write less and the code is more flexible.
  • Risk: some type errors are only discovered when the program runs, not before. (In module 8 you'll see type annotations, which help mitigate this.)

It's worth clarifying that Python is dynamic but strongly typed: it doesn't mix types carelessly. For instance, adding a number and a text (3 + "books") produces an error rather than a surprising result.

What is Python used for in the real world?

Python is practically everywhere. Some standout areas:

  • Data science and artificial intelligence: it's the dominant language. Libraries such as NumPy, Pandas or scikit-learn (module 11) have made it the de facto standard.
  • Web development: frameworks like Flask and Django (module 10) power sites like Instagram or Pinterest.
  • Automation and scripting: renaming a thousand files, generating reports, sending automatic emails... Python is the Swiss Army knife of task automation.
  • Education: thanks to its simplicity, it's the introductory programming language at many universities.
  • Desktop applications, video games, embedded systems: less common, but also possible.

Companies like Google, Netflix, Spotify and NASA use Python in production every day.

Advantages and disadvantages

No language is perfect. A good professional knows the strengths and limitations of their tool:

Advantages Disadvantages
Clear syntax, easy to learn Slower than compiled languages (C, C++, Rust)
Enormous ecosystem of libraries for almost everything High memory consumption compared to low-level languages
Giant community: plenty of documentation and help Uncommon in native mobile development
Cross-platform (Windows, macOS, Linux) Dynamic typing can hide errors until runtime
High productivity: prototypes in hours, not weeks Historical parallelism limitations (we'll qualify this in module 8)

For our goal — learning to program and building a management system for a bookshop — the disadvantages hardly matter, and the advantages are decisive.

Your first line of code: print()

Tradition dictates that the first program in any language displays a greeting on screen. In Python, displaying something on screen is done with the print() function:

print("Hello, world!")

Let's analyze this line piece by piece:

  • print is the name of a function: a named command that Python ships with out of the box. Its job is to display on screen whatever you pass to it.
  • The parentheses ( ) indicate that we're calling (executing) the function, and inside them we put what we want it to display.
  • "Hello, world!" is a string: a literal text delimited by quotation marks. The quotes tell Python "this is text, not a command".

The result on screen would be:

Hello, world!

Notice that the quotes do not appear in the output: they only serve to delimit the text in the code.

We can go one step further and greet from our project:

print("Welcome to Papyrus, your neighbourhood bookshop")
print("Today is a great day to read")
Welcome to Papyrus, your neighbourhood bookshop
Today is a great day to read

Each call to print() writes its content and moves to the next line. In the next lesson you'll install Python and be able to run this yourself; for now, understanding the mechanics is enough.

The course project: the Papyrus bookshop

Throughout the whole course we're going to follow Papyrus, a small neighbourhood bookshop run by Ana, its owner. Ana has been managing the business with notebooks and loose sheets of paper for years — the inventory, the prices, the orders from regular customers like Luis... and she has decided to go digital.

Your mission as a student will be to build, little by little, the Papyrus management system. The plan, in broad strokes:

  • Now (module 1): represent the shop's first pieces of data — its name, book titles, prices — and display information on screen.
  • Modules 2-4: make decisions (is it in stock?), repeat operations (walk through the catalog) and organize the data into suitable structures.
  • Modules 5-7: model books and customers as objects, save the data to files and make the program robust against errors.
  • Modules 8-11: advanced techniques, automated testing, a website for the shop and analysis of its sales data.
  • Module 12: the final project will bring together everything you've learned.

Starting every new concept with a Papyrus example gives you context: you won't learn "what a list is" in the abstract, but rather "how do I store the shop's catalog". The data we use will always be fictional: classic public-domain books (The Odyssey, Don Quixote, Hamlet...) or made-up titles, and fictional people such as Ana or Luis.

Common Mistakes and Tips

  • Studying with Python 2 material: if you see print "Hello" without parentheses, or mentions of raw_input(), that material is obsolete. Always look for Python 3 resources.
  • Confusing "interpreted" with "not professional": Python being interpreted doesn't make it a toy language. Critical systems at enormous companies run on Python.
  • Forgetting the quotes in print(): print(Hello) without quotes causes an error (NameError), because Python looks for a variable named Hello instead of treating the text literally. Text always goes between quotes.
  • Trying to run before you can walk: it's tempting to jump straight to artificial intelligence or web development. Resist: the fundamentals in modules 1 to 7 are the foundation for everything else.
  • Tip: get into the habit right now of reading code out loud. "Print the string Welcome to Papyrus" — if you can narrate what each line does, you truly understand it.

Exercises

You haven't installed Python yet (that comes in the next lesson), so these exercises are about comprehension and "programming on paper". Write down your answers before looking at the solutions.

Exercise 1

Classify each statement as true or false:

  1. Python needs a prior compilation step before it can run a program.
  2. In Python, a variable can hold a number first and a text afterwards.
  3. Python 2 is the recommended version for new projects.
  4. Python only allows object-oriented programming.

Exercise 2

Write (on paper or in any text editor) the lines of code needed for a program to display exactly this output:

Papyrus - Bookshop
Founded by Ana
Her favourite book: The Odyssey

Exercise 3

Look at this line and explain what each of its three parts does (name, parentheses, content):

print("Don Quixote costs 15.90 euros")

Solutions

Solution 1

  1. False. Python is interpreted: the interpreter executes the code line by line without generating an executable first.
  2. True. That's dynamic typing: the type is attached to the value, not to the variable.
  3. False. Python 2 lost support in 2020; all new development uses Python 3.
  4. False. Python is multi-paradigm: procedural, object-oriented and functional.

Solution 2

print("Papyrus - Bookshop")
print("Founded by Ana")
print("Her favourite book: The Odyssey")

Each print() produces one line of output. The text always goes between quotes, and the quotes don't appear on screen.

Solution 3

  • print — the name of the built-in function that displays text on screen.
  • (...) — the parentheses execute (call) the function; inside goes what it should display.
  • "Don Quixote costs 15.90 euros" — a string: the literal content that will be displayed, delimited by quotes.

Conclusion

In this lesson you've placed Python on the map: an interpreted, multi-paradigm, dynamically typed language, born in 1991 and now ubiquitous in data science, the web and automation. You've seen its advantages (readability, productivity, ecosystem) and its limits (speed), you've understood your first instruction — print() — and you've met Ana and her bookshop Papyrus, the project we'll be building together.

In the next lesson, Setting Up the Development Environment, you'll install Python on your computer, try out the interactive interpreter and set up a professional editor so you can run all the course code yourself.

Python Programming Course

Module 1: Introduction to Python

Module 2: Control Structures

Module 3: Functions and Modules

Module 4: Data Structures

Module 5: Object-Oriented Programming

Module 6: File Handling

Module 7: Error and Exception Handling

Module 8: Advanced Topics

Module 9: Testing and Debugging

Module 10: Web Development with Python

Module 11: Data Science with Python

Module 12: Final Project

© Copyright 2026. All rights reserved