Introduction to programming with Python

An introduction to programming using Python

This is an introduction to Python aimed to students with no prior programming experience. There are many great introductions to Python, but we thought that it would be useful for us to create a new one that:

  • It relies mainly in examples and exercises.
  • It runs those examples and exercises directly in the web, avoiding the need to install Python in the first day of class.
  • It does not try to cover every detail of the Python language, but just what a beginner might need to start the journey.

We decided to try this approach after following the rustlings path, an exercise set aimed at teaching the Rust programming language. Rustlings assumes that the student has previously read the Rust introductory book. For this course we have decided to add resources to read for each topic, so, the student could start by reading these resources, and then proceed to practice with the code examples and exercises. Alternatively, the examples could be used in a practical session to teach the theory and, then, the exercises could be use as the practice for the students.

Why Python?

There are other very useful languages, like Javascript for the web, R for statistics, C or Rust for system programming, so, why should we start learning how to program in Python?

Python is:

  • one of the easiest languages to learn and understand. Learning how to program involves getting used to some abstract concepts related to how computers work, so the easier the language, the better the learning experience will be.
  • very productive. The same ease of use that make Python a good learning language make it very productive for professional developers.
  • free software. It is developed by a community and released under an open source licence.

These characteristics make Python a very popular tool.

According to IEEE Spectrum Python is the top programming language of 2024. In the 2024 stackoverflow survery, 51% of the developers had used Python in the last year; only Javascript, with 62.3%, is a more popular programming language. Moreover, 67.7% of these developers want to learn an use Python.

According to the 2023 Python Developer survey Python is used mostly for:

  • Web development (21%)
  • Data analysis (10%)
  • Data engineering (6%)
  • Machine learning (10%)
  • Academic research (9%)
  • Education (9%)

So, if you are interested in data analysis or web development, Python is not just a great language to learn, but an interesting professional option.

Python books and tutorials

Other interactive Python courses for beginers

Python reference documentation

The official Python documentation.

Technology

This site has been built with the quarto publishing system complemented by the quarto live extension that allows Python to run in the web browser by using pyodide. Without the effort of these open source developers this resource wouldn’t exist.

Licence

This content is released under a Creative Commons BY licence.