70/0006-M - FUNDAMENTALS OF COMPUTER SCIENCE
Academic Year 2020/2021
Free text for the University
GIORGIO FUMERA (Tit.)
- Teaching style
- Lingua Insegnamento
|[70/72] CIVIL ENGINEERING||[72/00 - Ord. 2013] 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.
Applying knowledge and understanding
Students will be capable of designing algorithms for solving simple data processing problems, and to express them as Python programs.
Students will be able to choose among several options during program design, related to data structures, to program structure, and to identifying the most effective algorithm.
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 learn, also autonomously, novel programming languages.
Basic knowledge of mathematics required for the enrolment in an engineering course is necessary.
- Introduction to the course (1 h)
- Binary information representation (lectures: 5 h; in-class exercises: 1 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).
- 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. Historical notes, main components, functionality and organization of operating systems.
- Algorithms (lectures: 6 h; in-class exercises: 2 h)
The concept of "algorithm". Flow diagrams as a graphical tool for representing simple algorithms. General principles of algorithm design.
- High-level programming languages, integrated development environments (lectures: 1 h)
- The Python language (lectures: 25 h; in-class exercises: 15 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), iterative statements (while, for); the input/output functions print and input; the break statement.
-- Program structure: functions. Built-in functions: Python's standard library, the math and random libraries. User-defined functions: the instructions 'def' and 'return', parameters, arguments, function call, scope of parameters and of local variables.
-- File management: text files, operations on files, access modes; the built-in functions open, close, read, readline, readlines, write.
-- Search algorithms: sequential and binary search; sorting algorithms: selection and insertion sort; coding in Python language.
In-class exercises on binary information representation, algorithm design, and computer programming in Python: 18 hours.
Laboratory exercises on computer programming in Python: 20 hours.
Due to the Covid-19 pandemic, classes can be delivered in live streaming or their recording can made available on-line, and laboratory exercises can be carried out through resources that will be available for remote learning, such as communication and collaboration platforms.
Verification of learning
The exam consists in a written test made up of one open question on computer architecture and organization and operating systems, one exercise on binary information representation, and some programming exercises in Python language. An oral test can be required, if deemed necessary to correctly evaluate student's knowledge.
To get a pass, students have to demonstrate a basic knowledge of all the course topics; in particular, for the Python language this means being capable of correctly using its main instructions (assignment, conditional execution, iteration, input/output), basic processing of 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 should 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 whole written test (and oral test, if any) 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 expressing it as a suitable Python program.
Due to the Covid-19 pandemic, the written test at the University premises can be replaced by a written test delivered through resources that will be available for remote learning and by an oral test carried out similarly.
Two alternative textbooks, available in different editions, are suggested for binary information representation and computer architecture and organization:
- 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.
Teaching material is available on the following web site (only in Italian): https://www.unica.it/unica/page/it/giorgiofumera_MAT_fondamenti_dinformatica_1
The following material is available:
- course syllabus in detail;
- an outline of the lectures on all course topics;
- classroom exercises and laboratory exercises, including solutions;
- a selection of exercises from past exams, including solutions.