Introduction to computer programming Single channel
Chair (Coordinator) and Rapporteur: DONATELLA FIRMANI
Lecturers
Objectives
General Objectives.
The objective of this course is to present the basics necessary for the use of a general-purpose imperative programming language. In particular, the use of the Python 3 programming language will be demonstrated.
Specific objectives
(a) Knowledge and understanding skills.
Students will know the basic constructs of the Python 3 language, will be able to understand a simple program written in Python 3 and to write programs in the same language. They will also be able to use an integrated development environment (IDE).
(b) Ability to apply knowledge and understanding.
At the end of the course, students will be able to solve simple algorithmic problems using the Python 3 programming language, correct syntactic and semantic errors using an IDE, and evaluate the correctness and complexity of the identified solutions.
(c) Autonomy of judgment.
Students will develop the ability to formalize algorithms using a programming language, choosing the constructs best suited to solve the individual problem. They will be able to evaluate the correctness, readability and generality of the solutions identified.
(d) Communication skills.
Students will acquire the ability to formally express a mental procedure for solving a problem, and to understand the crucial points of an algorithm.
(e) Learning skills
Students will be able to easily learn the use of imperative programming languages, appreciating similarities and differences from the Python 3 language.
Learning outcomes
a) Knowledge and understanding
At the end of the course, students will know the fundamentals of Python programming: variables, expressions, data types, control structures (conditional and iterative statements), functions, recursion, and the main data structures (strings, lists, dictionaries). They will also know the principles of text and number encoding, including binary, decimal and hexadecimal representations, and the ASCII, Unicode and UTF-8 standards.
b) Applying knowledge and understanding
Students will be able to write Python programs to solve concrete problems, implementing iterative and recursive algorithms, manipulating strings, lists and dictionaries, and handling files. They will be able to choose the most appropriate data structure and control construct depending on the problem to be solved.
c) Making judgements
Students will develop the ability to analyse a computational problem, evaluate different solution strategies, and identify the limitations of an approach (e.g. recursion limits and stack overflow). They will be able to interpret error messages and debug their own code independently.
d) Communication skills
Students will acquire the technical vocabulary of programming and basic computer science, and will be able to describe algorithms, data structures and design choices clearly and precisely, both in examinations and in code documentation.
e) Learning skills
Students will develop a working method that allows them to independently tackle new programming problems, consult technical documentation, and extend their skills to languages and paradigms beyond those covered in the course.
Prerequisites
There are no formal requirements. Basic familiarity with logical-mathematical reasoning is helpful.
Programme
The course introduces imperative programming through the Python language. The first part covers the fundamental constructs of the language: variables, expressions, numeric data types, conditional statements, iteration and function definition. Recursion, stack diagrams and the limits of recursion are also addressed. The second part focuses on the main data structures: strings and text manipulation, lists, dictionaries and file handling. The course concludes with the fundamentals of information encoding: binary, decimal and hexadecimal representation of integers, and character encoding standards (ASCII, Unicode, UTF-8).
Books
The main course material is distributed by the teacher through the Moodle website. Useful texts for further reading are:
- Allen Downey, Think Python — How to Think Like a Computer Scientist; available under GNU Free Documentation License
- Cay S. Horstmann, Rance D. Necaise — Python for Everyone. Wiley.
Consult the Moodle site of the course for slides and exercises: https://elearning.uniroma1.it/course/view.php?id=18876
Lessons mode
The course consists of theoretical lectures and hands-on programming lab sessions on real and synthetic problems.
Frequency
Not mandatory
Exam mode
Assessment is carried out through a written practical exam in a computer lab. The candidate must solve Python programming exercises, demonstrating the ability to apply the constructs and data structures covered in the course. Code correctness is the primary evaluation criterion. Other aspects include appropriate use of tools and clarity of the proposed solution.
There will be no intermediate tests.
Example exam questions
Here is an example of a programming exercises http://www.statistica.uniroma1.it/users/pfrancio/introPython/more_exercises/moreexercises.html
Check the Moodle website for more exercises.
Arguments
- Values, variables, expressions
- Data types and Strings
- Calling and defining functions
- Conditional statements
- Istruzioni di iterazione
- Iteration and recursion
- Lists, Matrici and data sequences
- Dictionaries
- File handling
- Data representation and encoding
Sustainability goals
- Academic year2026/2027
- Degree program to which the course belongsStatistical Methods and Applications
- Lesson codeAAF2348
- Year and semester1st year - 1st semester
- Activity typeUlteriori attività formative (art.10, comma 5, lettera d)
- Academic areaAltre conoscenze utili per l'inserimento nel mondo del lavoro
- Mandatory presenceNo
- Languageeng
- CFU3 CFU
- Total duration27 hours
- Hours distribution27 classroom hours