Laboratorio: introduction to python programming

A.A. 2024/2025
3
Crediti massimi
20
Ore totali
Lingua
Inglese
Obiettivi formativi
The aim of this workshop is to guide students in practicing computer programming concepts using Python programming language and solving problems through algorithmic methods.
Risultati apprendimento attesi
By the end of this workshop, students will be able to understand and use basic Python programming concepts, apply algorithmic approaches to solve programming problems, write and test Python code to complete specific tasks, identify and fix basic errors in their code, and design and implement simple programs using Python in application areas within humanities studies.
Students will have access to course materials and supplemental resources on the myAriel platform, as well as the opportunity to consult with the instructor during office hours or via email.
Corso singolo

Questo insegnamento può essere seguito come corso singolo.

Programma e organizzazione didattica

Edizione unica

Responsabile
Periodo
Secondo semestre

Programma
The content of the laboratory includes:
- Getting Started with Python: Installing Python, introduction to basic syntax and variables, writing and running your first Python script.
- Control structures: Conditional statements (if, else, elif), Loops (for and while), Special statements (break, continue, and pass)
- Data types: lists, tuples, dictionaries, and sets
- Functions: Defining and calling functions, Parameters, return values, and scope.
- Input/Output Instructions: Handling user input and creating formatted output.
- File Handling: Reading from and writing to files
- Working with Python Libraries: Installing and importing libraries, Using built-in libraries (e.g., math, statistics).Introduction to data-focused libraries: Pandas and NumPy, Basics of data visualization with Matplotlib.
- Object-Oriented Programming (OOP): Classes and objects, Constructors, attributes, and methods.
- (Optional) Introduction to Web Scraping and APIs: Basics of web scraping and APIs, Accessing historical data via APIs.
Prerequisiti
Basic computer skills. To apply for admission to the workshop, it is mandatory to follow the instructions on the webpage: https://scienzestoriche.cdl.unimi.it/it/insegnamenti/laboratori
Metodi didattici
This course is conducted through hands-on laboratory exercises. Students will attend lessons in a computer lab, where they will solve problems by applying the corresponding algorithms and implementing solutions using the Python programming language.
Each lecture will begin with an explanation of the key concepts and objectives. Exercises for the lessons will be provided on the course website and made available prior to each class. Class attendance is mandatory.
Materiale di riferimento
Any general Python book can be used to support learning the course material. Suggested resources include:
· Think Python: How to Think Like a Computer Scientist by Allen B. Downey (Second Edition, 2015), covering the key topics discussed in lectures. https://open.umn.edu/opentextbooks/textbooks/43, https://greenteapress.com/wp/think-python-2e/
· A Beginner's Guide to Python 3 Programming by J. Hunt (https://minerva.unimi.it/permalink/39UMI_INST/i9q3jt/alma991017213265306031)
· NumPy (https://numpy.org/) and pandas (https://pandas.pydata.org/) have excellent documentation online.
Modalità di verifica dell’apprendimento e criteri di valutazione
Examination method: Evaluation will be based on lecture attendance and a final exam conducted at the end of the course. The exam will take place in a computer lab and will involve solving a problem by writing Python code. Additionally, there will be a written component to assess foundational knowledge. There will also be homeworks (optional) in form of exercises, to be solved either in class or at home, and serve as extra grades.
Evaluation criteria: Students will be assessed on their ability to demonstrate and apply Python programming skills, articulate their understanding clearly, and showcase algorithmic thinking capabilities. Evaluation will consider technical accuracy, clarity, and effective use of programming concepts.
Type of evaluation method: approval of 3 CFU.
Assessment result: approved/not approved.

The format of the assessment for students with disabilities should be arranged in advance with the lecturer.
- CFU: 3
Laboratori Umanistici: 20 ore
Docente: Aslan Sinem