Suddivisione dell'attività didattica
LIMONGELLI CARLA
Obiettivi
To provide the basics of "computer culture" through the introduction of effective methodological and conceptual tools, aiming to face in a flexible way the evolution of technology and the broad world of applications, emphasizing the role of Computer Science as a discipline for the automatic solution of problems.Specific objectives:
- To understand the essential elements related to computer architecture and operating systems, as well as information representation;
- To gain the ability to design and code simple algorithms using structured programming and basic programming techniques such as iteration, as well as elementary data structures;
- To understand and use testing methodologies (debugging) for the produced code.
Programma
COURSE PROGRAMComputer operations and representation of information
-computer architecture
-operating systems
-binary arithmetic
-compilation and execution of programs
Algorithms
-program specification
-programming quality
-representation and algorithm design
Programming Fundamentals
-programming langauges
-variables
-Instructions
-types data
-Instructions structured
-style programming
-structure of the program
-functions
Software correctness
-testing methods
-debugging
Management of data sets
-arrays
-strings
Pointers and dynamic memory allocation
Data structures, struct, files
Recursion
Sorting and searching algorithms
Computational cost of programs
- Big O, Omega and Theta notations
- best, average, and worst case analysis
Data types: lists
Prerequisiti
NoneTesti Adottati
Alessandro Bellini, Andrea GuidiLinguaggio C - Quinta edizione
ISBN: 9788838668210- Autore: Kernighan, Ritchie
Titolo: Il linguaggio C. Principi di programmazione e manuale di riferimento
Editore: Pearson
Bibliografia Di Riferimento
Alessandro Bellini, Andrea Guidi Linguaggio C - Quinta edizione ISBN: 9788838668210- Autore: Kernighan, Ritchie Titolo: Il linguaggio C. Principi di programmazione e manuale di riferimento Editore: PearsonModalità Erogazione
- live and online lectures, live and online exercise sessions - attending is not mandatoryModalità Frequenza
- attending is not mandatoryModalità Valutazione
The exam consists of some multiple-choice answers (25 minutes, 17 questions, up to grade 8,5 points) and of some programming exercises (120 minutes, 3 questions, up to 24 grade points), to be realized on a computer. Two intermediate examinations, together with a preliminary one, replace the exam, if passed with success. Student assessment is based on the Dublin Descriptors and takes into account the level of knowledge, understanding, and critical processing of the topics covered in the course. Students who demonstrate that they have acquired the fundamental concepts and are able to apply them in simple contexts will receive a passing grade. Average grades will be awarded to those who, in addition to mastering the basics, show the ability to analyze and independently elaborate on more complex concepts. The highest grades are reserved for students who demonstrate in-depth understanding, synthesis skills, critical thinking, and autonomy in solving problems, including new ones or those not explicitly addressed during the course.Esempi Domande
An algorithm is to be designed to solve the following problem. Given a sequence of at least three integers, verify that in every triple of consecutive integers in the sequence there are at least two even integers whose sum is divisible by 7.For example, the sequence [-5, -2, 16, 6, 12, 8] is a positive instance of the problem, since the triple [-5, -2, 16] contains the even integers -2 and 16 and -2 + 16 = 14 is divisible by 7; the triple [-2, 16, 6] contains the even integers -2 and 16 and -2 + 16 = 14 is divisible by 7; the triple [16, 6, 12] contains the even integers 16 and 12 and 16 + 12 = 28 is divisible by 7; and the triple [6, 12, 8] contains the even integers 6 and 8 and 6 + 8 = 14 is divisible by 7.
The sequence [3, 4, 6] is instead a negative instance of the problem, because the triple [3, 4, 6] contains two even integers but their sum is not divisible by 7.
You must implement a C function funzioneArray1 with parameters:
a reference to an array of integers; and
an integer representing the length of the array.
The function returns 1 if every triple of consecutive integers in the sequence contains at least two even numbers whose sum is divisible by 7; otherwise it returns 0.
FRATI FABRIZIO
Obiettivi
To provide the basics of "computer culture" through the introduction of effective methodological and conceptual tools, aiming to face in a flexible way the evolution of technology and the broad world of applications, emphasizing the role of Computer Science as a discipline for the automatic solution of problems.Specific objectives:
- To understand the essential elements related to computer architecture and operating systems, as well as information representation;
- To gain the ability to design and code simple algorithms using structured programming and basic programming techniques such as iteration, as well as elementary data structures;
- To understand and use testing methodologies (debugging) for the produced code.
Risultati Apprendimento Attesi
At the end of the first module, students will be able to understand the basic functioning of a computer and information representation, analyze problems and design algorithms, and develop programs in C following the principles of structured programming, using variables, data types, control statements, functions, as well as arrays and strings.Programma
Computer operations and representation of information-computer architecture
-operating systems
-binary arithmetic
-compilation and execution of programs
Algorithms
-program specification
-programming quality
-representation and algorithm design
Programming Fundamentals
-programming langauges
-variables
-Instructions
-types data
-Instructions structured
-style programming
-structure of the program
-functions
Software correctness
-testing methods
-debugging
Management of data sets
-arrays
-strings
Prerequisiti
NoneTesti Adottati
Autore: Bellini, GuidiTitolo: Linguaggio C - Guida alla programmazione con elementi di Python
Edizione: Settima edizione
Editore: McGraw-hill
Anno: 2025
Bibliografia Di Riferimento
Author: Kernighan, Ritchie Title: Il linguaggio C. Principi di programmazione e manuale di riferimento Edition: Seconda edizione Editor: Pearson Year: 2004Modalità Erogazione
live and online lectures, live and online exercise sessionsModalità Frequenza
attending is not mandatoryModalità Valutazione
The exam consists of some multiple-choice answers (25 minutes, 17 questions, up to grade 8,5 points) and of some programming exercises (120 minutes, 3 questions, up to 24 grade points), to be realized on a computer. Two intermediate examinations, together with a preliminary one, replace the exam, if passed with success. Student assessment is based on the Dublin Descriptors and takes into account the level of knowledge, understanding, and critical processing of the topics covered in the course. Students who demonstrate that they have acquired the fundamental concepts and are able to apply them in simple contexts will receive a passing grade. Average grades will be awarded to those who, in addition to mastering the basics, show the ability to analyze and independently elaborate on more complex concepts. The highest grades are reserved for students who demonstrate in-depth understanding, synthesis skills, critical thinking, and autonomy in solving problems, including new ones or those not explicitly addressed during the course.Esempi Domande
We want to design an algorithm to solve the following problem. Given a sequence of at least three integers, verify that in every triple of consecutive integers in the sequence there are at least two even integers whose sum is divisible by 7. For example, the sequence [-5, -2, 16, 6, 12, 8] is a positive instance of the problem, since the triple [-5, -2, 16] contains the even integers -2 and 16 and -2+16=14 is divisible by 7; the triple [-2, 16, 6] contains the even integers -2 and 16 and -2+16=14 is divisible by 7; the triple [16, 6, 12] contains the even integers 16 and 12 and 16+12=28 is divisible by 7; and the triple [6, 12, 8] contains the even integers 6 and 8, and 6 + 8 = 14 is divisible by 7. The sequence [3, 4, 6] is instead a negative instance of the problem, because the triple [3, 4, 6] contains two even integers, but their sum is not divisible by 7.Deliver a C function, functionArray1, with parameters: 1) a reference to an array of integers; and 2) an integer representing the length of the array. The function returns 1 if every triple of consecutive integers in the sequence contains at least two even numbers whose sum is divisible by 7, and returns 0 otherwise.
