Computer Science

Civil Engineering, Politecnico di Milano, 2022/2023

The course is aimed at first-year civil engineering students that are introduced to the fundamental concepts of Computer Science (algorithms, programs, general structure of computers and computer systems).
The basic notions of computer programming (programming language, abstraction techniques, fundamental data types and control structures, sub-programs) are presented taking into account mainly the C language with an emphasis on both conceptual and practical aspects.


IMPORTANT: The deadline for the submission of the AutoCAD project is monday 9th January 2023. Please note that this will be the only deadline: projects turned in after the deadline will be ignored. The mark of the project (if at least 2), will be valid for the whole year. The grades of the AutoCAD projects of the previous a.y. 2020/2021 and 2021/2022 are still valid.


Practical Sessions

Practical sessions are provided by Dr. Diego Stucchi.


Tutoring sessions are provided by Michele Craighero during January and February 2023. Partecipation is not mandatory but it is higly reccomended. Tutoring session will delivered both in presence and on-line: Webex room

Please use to register your presence. Material is available here.

  • 13th January 14:30-17:00 - classroom 26.04
  • 17th January 14:30-17:00 - classroom 3.1.9
  • 26th January 14:30-17:00 - classroom 3.1.5
  • 30th January 14:30-17:00 - classroom 3.1.3
  • 08th February 14:30-17:00 - classroom 3.1.8
  • 13th February 14:30-17:00 - classroom 3.1.4


The exam consists in two parts:

  • the written exam: covers the elements of programming in C and Fortran. The max grade is 27. The exam will last 2 hours during which no books or notes may be consulted, no calculators or cell phones may be used. The best way to prepare the written exam is by solving previous exams.
  • the autoCAD project: covers the topics addressed during the autoCAD labs. The max grade is 6.

The final grade is given by the sum of the mark in the written test (if greater or equal to 15) and the mark of the AutoCAD project (if greater or equal to 2).

int scoreAutoCad ,scoreWrittenTest;
// initialize the variables...
if(scoreAutoCad >=2 && scoreWrittenTest>=15){
    if(scoreAutoCad + scoreWrittenTest>=18){
        int finalGrade;
        finalGrade = coreAutoCad + scoreWrittenTest;
        fprintf("don't get discouraged, practice more and try again!");

Mock exams

Previous exams

Additional Resources

I would like to thank Marco Lattuada, Marcello Restelli, Giacomo Boracchi and Andrea Fusiello for sharing with me their advices and their teaching materials on which the slides of this course are largely based.