COMPUTER SCIENCE 1
Academic Year 2021/2022 - 1° YearCredit Value: 6
Taught classes: 35 hours
Exercise: 12 hours
Term / Semester: 2°
Learning Objectives
Synthetic general description
The course presents the basics of computer programming by adopting Python as reference language.
The basic concepts of imperative programming are presented without neglecting the use of specific libraries for scientific computing. In particular, the learner is led towards the acquisition of the classical conceptual tools of structured programming through the description and use of built-in structures for data processing, the coding of remarkable algorithms and the use of the technique of recursion. Throughout the course we will use a professional development environment for the Python language.
General educational objectives of teaching in terms of expected learning
- Knowledge and understanding: the primary objective of the course is the students' acquisition of the "philosophy" of structured programming, as well as the detailed knowledge of syntax and semantics of the Python programming language. The course pays particular attention to the development of well-written and well-structured code using the basic techniques for software development in the imperative paradigm.
- Applying knowledge and understanding: it intends to provide the tools to achieve the following practical and professional skills:
- To analyze computational problems and to code algorithmic ideas for their resolution;
- To design, to describe, to implement and debug Python programs with professional tools;
- To use built-in data structures for data management in scientific computing;
- Understanding simple recursive algorithms;
- To use specific libraries for scientific calculation;
- To read, to understand and analyze third-party Python code also in terms of efficiency;
- To be able to read documentation of libraries. - Making judgements: through the examination of code examples and numerous practice exercises, the learner will be able, both independently and in a cooperative manner, to analyze problems and design and implement related software solutions.
- Communication skills: the student will acquire the necessary communication skills and expressive appropriateness in the use of technical verbal language in the context of computer programming.
- Learning skills: the course aims to provide the learner with the necessary theoretical and practical methodologies to be used in professional contexts and, in particular, the ability to formulate and implement ad-hoc algorithms for solving new computational problems as well as the possibility of easily and quickly acquiring other programming languages.
Course Structure
Video projector is used for lectures in the classroom.
All the material shown (slides and code fragments) is made available to students in the Studium website.
The slides are not intended to replace the reference texts but represent a precise guide to the course topics.
In order to pursue the educational objectives of the course set out in the descriptors 2) Applying knowledge and understanding and 3) Making judgments:
- many lessons will be carried out in an interactive teacher-learners mode;
- practical classroom exercises are planned to familiarize the learners with the drafting of Python code;
- some case studies in the field of small software design will be discussed.
If the teaching is given in online mode (also partially) some changes could be introduced in order to comply the program reported in the Syllabus.
Detailed Course Content
- Introduction to programming
- Problems and Algorithms. Variables, Expressions and Assignments.
- Flow chart, Structured linear notation, Böhm-Jacopini theorem.
- Representation of information: integers and floating-point numbers, characters, strings, images and sounds (outline).
- Programming languages
- Programming languages: machine, assembly and high level.
- Translation problem: compilation and interpretation.
- Installation of the development environment for the Python language. First program: Editing, Running, Debugging.
- Constructs of Python language
- Basic syntax, data types, predefined operators, I/O management.
- Numbers and mathematical functions.
- Flow control: consructs of selection and iterative.
- Functions.
- Built-in data structures in Python
- Strings.
- Lists, Tuples,
- Sets, Dictionaries.
- Advanced topics
- Notable algorithms: Searching, Sorting, Merging. Basics of computational complexity.
- Recursive functions.
- Modules. Basics on the mathematical libraries NumPy and SciPy and the graphic library PlotPy.
Textbook Information
1) A.Downey, Think Python, 2nd Ed., Grean Tea Press (online available).
2) C.Horstmann - R.Necaise, Concetti di Informatica e fondamenti di Python, 2nd. Ed., Maggioli Editore.
3) M.Lutz, Learning Python, 4th Ed., O'Reilly (online available).
4) D.Pine, Introduction to Python for Science and Engineering, SMTEBooks - CRC Press (online available).
As regards the course, book (2) is adopted.
Please note that all the above texts are in any case suitable for achieving the learning objectives, however:
- book (2) is recommended for beginners as it is an introduction to programming and with a large number of exercises present in it;
- book (3) is at advanced level and is recommended for those who are already familiar with the programming.