Unit 02 — Python Programming Fundamentals

Welcome to the first programming unit of the course. In this unit, we will learn how to express instructions with Python, execute them in different environments and use evidence to decide whether a program behaves as intended.

Python is widely used in engineering, management, data analysis, automation and artificial intelligence. It is also an excellent first programming language: its syntax lets us concentrate on the ideas behind a program without hiding the need for precision, testing and clear reasoning.

During the unit, we will use two complementary environments:

  • Google Colab for guided notebooks, short experiments and classroom work;

  • Visual Studio Code with local Python and Jupyter for projects, files, Git and governed AI assistance.

We will also use Git and GitHub to preserve the history of our work. Gemini and Cline may support learning during class, but their suggestions must follow the assistance level defined for each activity and must always be understood, tested and explained by the student.

Unit learning objectives

By the end of the unit, you should be able to:

  • distinguish source code, a programming environment and an execution environment;

  • write and execute Python instructions in notebooks and scripts;

  • call built-in and library functions and import Python modules;

  • represent program state with variables and basic data types;

  • construct numeric expressions and convert values deliberately;

  • express decisions with Boolean expressions and conditional structures;

  • repeat operations with for, range() and lists;

  • construct and represent a simple numeric series;

  • use Git to record and publish meaningful versions of your work;

  • use AI assistance responsibly and verify every adopted suggestion.

The recurring learning cycle is:

predict → execute → compare → explain

Welcome to Python programming

How to use this page

Each session contains:

  • the scheduled date and learning focus;

  • the presentation used in class;

  • the follow-along and practice materials, when applicable;

  • related tutorials for preparation, review or further study.


Session 03 — Course environment, Git and governed AI

Date: 14 September

Focus: Prepare the complete course workflow: Colab, local Python and Jupyter, Visual Studio Code, Git, GitHub, Gemini and Cline.

In this practical onboarding session, we will create a first Python notebook, export it as .ipynb and .py, execute both versions locally and publish the initial course workspace to a private GitHub repository. We will then compare AI assistance with and without the course tutor configuration.

Presentation

Class materials


Session 04 — Python execution, functions and libraries

Date: 17 September

Focus: Understand how Python and notebook execution work, call available functions and use Python libraries without defining functions of our own yet.

We will reason about instructions, literals and sequential execution; observe notebook state and kernel restarts; identify function calls and arguments; use initial built-in functions; install a package; import modules in different ways; and read simple syntax and runtime errors.

Presentation

Class materials

Related tutorials and extra materials


Session 05 — Variables, types and numeric operations

Date: 18 September

Focus: Represent changing program state and construct meaningful numeric expressions.

We will introduce variables, assignment and reassignment; distinguish int, float and str; use arithmetic operators; reason about precedence and parentheses; convert input values; and identify code that executes but loses necessary information or precision.

Presentation

Class materials

Related tutorials and extra materials


Session 06 — Boolean expressions and selection control flow

Date: 23 September

Focus: Model decisions with Boolean values, comparisons and conditional branches.

We will construct and trace comparisons; store Boolean program state; combine conditions with and, or and not; select actions with if, if-else and if-elif-else; and test condition order, coverage and boundary values.

Presentation

Class materials

Related tutorials and extra materials


Session 08 — Loops, lists, series and visualisation

Date: 30 September

Focus: Repeat operations, preserve successive results and represent an ordered series graphically.

We will introduce iterables, for, range(), lists, integer indexing, append() and accumulators. We will construct a simple numeric series, locate positions that require attention and create an introductory Matplotlib plot. Slicing and functions defined with def are deliberately reserved for later sessions.

Presentation

Class materials

Related tutorials and extra materials


Additional unit resources

After Session 08, the course moves temporarily to Arduino and communications. Python resumes in Unit 04 with function definitions, advanced iterables, NumPy, structured data and Pandas.