Programming II
| Keywords |
| Classification |
Keyword |
| OFICIAL |
Computer Science |
Instance: 2025/2026 - 2S 
Cycles of Study/Courses
Teaching Staff - Responsibilities
Teaching language
Suitable for English-speaking students
Objectives
- Identify types of errors: syntactic, semantic, runtime
- Recognize problems with mutable structures
- Identify the basic Python structures and recognize their properties, attributes, and methods
- Define new data structures with specific properties
- Write recursive functions
- Define properties of programs and test them
- Identify types of files and how to manipulate them
- Use Numpy and Pandas to perform data analysis
- Use MatPlotLib to visualize data
- Configure NumPy, Pandas and MatPlotLib programs in order to solve specific problems.
Learning outcomes and competences
By the end of the course, the student will be able to:
- Use the basic Python data structures with confidence.
- Program with the adequate level of abstraction and encapsulation.
- Produce correct, well-structured, and well-documented code.
- Extract and process data from diverse sources and in different formats.
- Use external libraries for the visualization of numerical data.
Note: all coding in this course is to be done in Python.
Working method
Presencial
Pre-requirements (prior knowledge) and co-requirements (common knowledge)
Some basic familiarity with the Python language and its development environment is preferential, as present in the program of the Programming I Curricular Unit.
Program
Review of Python. Basic Python data types. Data types for collections: lists, queues, stacks, tuples, dictionaries and sets.
Mutability vs Immutability: advantages and disadvantages, precautions to take.
Definition of new data types: classes, objects, attributes, and methods. Structuring of code using modules.
Concepts on the most typical examples of objects (linked lists, stacks, queues, trees, among others).
Properties of programs: defining properties and testing them using Hypothesis.
Manipulation of text, JSON, and CSV files.
Data processing and analysis using the libraries NumPy and Pandas.
Data visualization using the library MatPlotLib.
Mandatory literature
Allen Downey;
How to think like a computer scientist. ISBN: 0-9716775-0-6
Complementary Bibliography
Daniel Y. Chen; Pandas for Everyone, Addison-Wesley
Jake VanderPlas; Python data science handbook: Essential tools for working with data, O'Reilly Media, Inc (https://jakevdp.github.io/PythonDataScienceHandbook/)
Wes McKinney; Python for data analysis: Data wrangling with Pandas, NumPy, and IPython, O'Reilly Media, Inc
Christian Hill; Learning Scientific Programming with Python 2nd Edition, Cambridge University Press , 2020. ISBN: 1108745911 (https://scipython.com/book2/)
Teaching methods and learning activities
- Lectures, with examples of problem solving.
- Practical sessions in the laboratory.
- Homework.
Software
Pycharm Community Edition
keywords
Physical sciences > Computer science > Programming
Evaluation Type
Distributed evaluation without final exam
Assessment Components
| designation |
Weight (%) |
| Trabalho prático ou de projeto |
50,00 |
| Teste |
50,00 |
| Total: |
100,00 |
Amount of time allocated to each course unit
| designation |
Time (hours) |
| Estudo autónomo |
106,00 |
| Frequência das aulas |
56,00 |
| Total: |
162,00 |
Eligibility for exams
To get an attendance certificate, the student must attend the required number of lectures.
Calculation formula of final grade
Grading will the done via:
- a practical individual project (50%), to be developed during the practical sessons and including additional homework tasks
- a written test on the concepts taught in class (50%).
The final grade will be the arithmetic average of the grades from the project and the test, where the component of the test has a minimum grade of 6 out of 20 for the student to be approved.
Students that do not have the minimum grade of 6 out of 20 in the test can repeat this component in the resit exam.
Special assessment (TE, DA, ...)
Students with working student status or access to the special phase will be able to repeat the test component in that timing.
Classification improvement
The resit exame will substitute the test grade component in the calculation of the final grade.