- Docente: Mauro Gaspari
- Credits: 6
- SSD: INF/01
- Language: Italian
- Moduli: Mauro Gaspari (Modulo 1) Michele Ennio Maria Moresco (Modulo 2)
- Teaching Mode: Traditional lectures (Modulo 1) Traditional lectures (Modulo 2)
- Campus: Bologna
- Corso: First cycle degree programme (L) in Astronomy (cod. 6638)
-
from Sep 22, 2025 to Dec 17, 2025
Learning outcomes
At the end of the course, the student has a basic understanding of computational tools and terminology. He is able to: - use programming languages to write small scale programs; - understand programs written by others; - map simple physical problems into computational solutions.
Course contents
Module 1:
Computational tools and problem solving. Declarative and Imperative knowledge. High level programming languages and tools. Interpreters and Compilers. The role of debugging.
Scripting Languages. The Python interpreter. Computer programming in Python.
Variables expressions, and statements; signed number representation and the approach of Python. Functions, conditionals and recursion; Iteration; Data types; Tables; Exporting data in csv files; spreadsheet creation; Python built-in data types and basic
Object Oriented Programming concepts and notation.
Module 2:
Python modules focusing on graphical and scientific/numerical ones; Analysis and browsing of data catalogs using different formats (ascii, fits); Sample selection and correlation analysis; Statistical methods for data modelling; solving astronomical problems.Readings/Bibliography
How to Think Like a Computer Scientist: Learning with Python, di Allen Downey, Jeff Elkner e Chris Meyers. Gree Tea Press (disponibile in rete: https://media.readthedocs.org/pdf/howtothink/latest/howtothink.pdf).
Teaching methods
Lectures and class exercises.
Considering the teaching methods adopted for this activity, passing modules 1 and 2 of our security courses available at [https://www.unibo.it/en/services-and-opportunities/health-and-assistance/health-and-safety/online-course-on-health-and-safety-in-study-and-internship-areas] is mandatory for attending the lectures.
Assessment methods
The exam consists of two parts: a written test, which includes one to three Python programming exercises comprising a total of 3 to 5 functions to be implemented by hand (using pen and paper); and an oral exam, which involves the discussion of a project on the analysis of a sample of astrophysical data.
The exam is graded on a 30-point scale. The final grade is the average of the two components, both evaluated out of 30. To be admitted to the oral exam, students must pass the written test with a grade of 18 or higher. The grade from the written exam and/or the final grade may be declined a maximum of two times.
For the written exam, the test will evaluate the student's programming abilities and will last approximately 90 minutes, with slight variations depending on the difficulty of the exercises. Marks will be awarded according to the following criteria based on the number of correctly implemented functions: At least one correct function implemented: 18–19. More than one correct function, but with several incorrect or missing functions: 20–24. One missing function, or all functions implemented but some with errors: 25–29. All functions correct: 30–30L.
The oral exam lasts approximately 30–40 minutes. Each project is individual and personal. To take the exam, students must submit the developed code to the Module 2 instructor one week prior to the oral examination. During the exam, students will be asked questions about the code they developed, as well as topics covered in Module 2 lectures. The aim is to assess the student's understanding and knowledge of the informatics methodologies discussed in class and practiced during lab sessions.
The exam is graded on a 30-point scale, with the following grade ranges: 18–20: Barely sufficient preparation and very limited understanding of Python programming concepts. 21–23: Very limited preparation and reduced understanding of Python programming concepts. 24–26: Intermediate preparation and moderate understanding of Python programming concepts. 27–29: Broad, though not complete, preparation and good/very good understanding of Python programming concepts. 30–30L: Complete preparation and excellent understanding of Python programming concepts.
Students with learning disabilities or temporary or permanent disabilities: please contact the relevant University office promptly (https://site.unibo.it/studenti-con-disabilita-e-dsa/it ). The office will advise students of possible adjustments, that will be submitted to the professor for approval 15 days in advance. He/she will evaluate their suitability also in relation to the academic objectives of the course.
Teaching tools
whiteboard + video projector + laptop
Office hours
See the website of Mauro Gaspari
See the website of Michele Ennio Maria Moresco
SDGs



This teaching activity contributes to the achievement of the Sustainable Development Goals of the UN 2030 Agenda.