70/0006-M - FUNDAMENTALS OF COMPUTER SCIENCE
Academic Year 2022/2023
Free text for the University
GIORGIO FUMERA (Tit.)
- Teaching style
- Lingua Insegnamento
|[70/72] CIVIL ENGINEERING||[72/00 - Ord. 2021] PERCORSO COMUNE||6||60|
|[70/73] ENVIRONMENTAL AND LAND ENGINEERING||[73/00 - Ord. 2020] PERCORSO COMUNE||6||60|
This course provides basic knowledge of:
- computer architecture and organization;
- algorithm design;
- high-level programming languages and integrated development environments;
- the Python programming language.
The learning outcomes expressed in terms of the Dublin descriptors are the following:
Knowledge and understanding
Students will know and understand:
- the basic elements of the architecture and organization of computers, as machines that automatically execute algorithms;
- the basic elements of the Python language, common to all high-level programming languages: variables; assignment, conditional and iterative execution; data types and data structures; modular structure of computer programs through user-defined functions.
Applying knowledge and understanding
Students will be capable of designing algorithms for solving simple data processing problems, and of expressing them as Python programs.
Students will be able to choose among several options during program design, related to data structures, program structure, and algorithmic efficiency.
Students will know the basic concepts and terminology of computer science. In the context of program design they will be able to properly express aspects and issues related to algorithm design and to their coding in a programming language.
Lifelong learning skills
Students will be able to autonomously learn novel programming languages.
Basic knowledge of mathematics required by engineering courses is a must.
- Computer architecture and organization, and operating systems (lectures: 4 h)
Historical notes. Main components of a computer: central processing unit, main memory, system bus, peripherals. Instruction cycle. Operating systems: historical notes, main components, functionality and organization.
- Binary information representation (lectures: 6 h; in-class exercises: 2 h)
Analogue and digital representation. Binary representation of natural numbers, integers (sign-magnitude, two's complement) and real numbers (fixed point, floating point). Principles of binary representation of non-numeric information (text, image, audio and video data).
- Algorithms, programs, programming languages and integrated development environments (lectures: 2 h)
- The Python language (lectures: 36 h; in-class exercises: 10 h; laboratory exercises: 20 h)
-- Main data types: integer and floating point numbers, character strings, Boolean values. Structured data types: lists and dictionaries.
-- Main instructions: assignment, conditional statements (if, if-else, if-elif), iterative statements (while, for); input/output functions: print, input; the break statement.
-- Program structure: functions. Built-in functions: Python's standard library, the libraries math and random. User-defined functions: instructions 'def' and 'return'; parameters, arguments, function call; scope of parameters and of local variables.
-- File management: text files, operations on files, access modes; built-in functions: open, close, write, read, readline, readlines.
-- Search algorithms: sequential and binary search; sorting algorithms: selection and insertion sort; coding in Python language.
Lectures: 48 hours.
In-class exercises on binary information representation and computer programming in Python: 12 hours.
Laboratory exercises on computer programming in Python: 20 hours.
Lectures and in-class exercises will be held in person, possibly complemented with live streaming.
Verification of learning
The examination consists in a written test on Python programming and in an oral test encompassing all course topics.
To get a pass, students have to demonstrate a basic knowledge of all the course topics; in particular, they must be capable of: correctly using Python's main instructions and built-in functions (assignment, conditional execution, iteration, input/output), processing simple and structured data types, writing a program in the form of a user-defined function, and coding basic operations for file input/output; students must also be capable of describing in natural language the algorithms they have coded in Python.
The final grade, expressed in a numeric scale from 18 to 30, will be defined through an overall evaluation of the written and oral tests on the basis of the following criteria: degree of understanding of the course topics, logic followed for algorithm design, level of complexity of problems for which the student will be capable of designing an algorithm and of coding it as a suitable Python program, and cofrrectness of speech.
Two alternative textbooks, available in different editions (in Italian), are suggested for computer architecture and organization, and binary information representation:
- Stefano Ceri, Dino Mandrioli, Licia Sbattella, "Informatica: arte e mestiere", McGraw-Hill.
- Donatella Sciuto, Giacomo Buonanno, Luca Mari, "Introduzione ai sistemi informatici", McGraw-Hill.
The following textbook is suggested for the Python language:
C. Horstmann, R.D. Necaise, "Python for Everyone", Wiley.
The following teaching material is available on the course web site (in Italian): https://unica.it/unica/page/it/giorgio_fumera_mat_fondamenti_dinformatica_1
- detailed course syllabus;
- an outline of the lectures on all course topics;
- in-class and laboratory exercises, including solutions;
- a selection of exercises from past examinations, including solutions.