Programming in Python

A.Y. 2024/2025
6
Max ECTS
56
Overall hours
SSD
INF/01
Language
English
Learning objectives
The course introduces students to imperative programming by referring to the Python language. The course is divided in two parts: the first presents Python and its object-oriented features, the second focuses on libraries that can be useful in scientific computation and data analysis, in particular NumPy and pandas.
Expected learning outcomes
Students will acquire the ability to write and tune a program that automatizes simple computational tasks; they will be able to understand how a small piece of Python code works, to find the reasons of a malfunction and to correct it appropriately. Moreover, students will be able to use the NumPy and pandas library to analyze tabular data.
Single course

This course cannot be attended as a single course. Please check our list of single courses to find the ones available for enrolment.

Course syllabus and organization

Single session

Responsible
Lesson period
First semester
Course syllabus
The Python 3 programming language. Native data types, typing hints. Functions, selections and iterations. Basic data structures: lists, tuples, dictionaries, and sets. Files. Object-oriented encapsulation, iterators. Numpy multi-dimensional arrays and matrices. Data manipulation and analysis with pandas and libraries for visualization (matplotlib). Basics of probabilistic programming.
Prerequisites for admission
Students are required to be able to solve computational problems in an algorithmic way.
Teaching methods
The course has lectures, which present the subject and interactively discuss problem solutions and laboratory sessions to experiment with tools. Course attendance is highly recommended.
Teaching Resources
Any Python3 book can be used to support the learning of the general part, for example J. Hunt "A Beginners Guide to Python 3 Programming" (https://minerva.unimi.it/permalink/39UMI_INST/i9q3jt/alma991017213265306031). NumPy (https://numpy.org/) and pandas (https://pandas.pydata.org/) have excellent documentation online.
Course website is linked from https://myariel.unimi.it/course/view.php?id=3137
Assessment methods and Criteria
The examination is based on a laboratory exercise. A final mark (on a 30 point scale) is given, by taking into account: knowledge of the subject and tools, and clarity of solutions.
INF/01 - INFORMATICS - University credits: 6
Practicals: 16 hours
Lessons: 40 hours
Professor: Monga Mattia
Educational website(s)
Professor(s)
Reception:
By appointment only
Office 5004, Via Celoria 18, Milan