Informatics for Science and Engineering B



The fundamental components of a computer.

The tools of a software development system.

The essential constructions of an imperative programming language.

Some fundamental notions of relational databases.

Some basic concepts involved in the World Wide Web.


Decompose a problem into simpler problems.

Design an algorithm for solving a simple problem.

Write a program, making a correct use of the basic constructions of an imperative programming language.

Test a program in a given programming environment.

State a very simple SQL query.

Access resources available in the network inside a program.


Ability to do a programming project.

Skills in time management.

General characterization





Responsible teacher

João Manuel dos Santos Lourenço, Vítor Manuel Alves Duarte


Weekly - 4

Total - 59

Teaching language



This unit has no access requirements.


Allen B. Downey. Think Python: How to Think Like a Computer Scientist. PDF and HTML at

Charles Severance. Python for Everybody: Exploring Data Using Python 3. PDF and HTML at This is based on the previous reference, containing chapters about Internet and Data Bases. There is also a version ( were you can change and execute the examples inside the book. 

Notes by Prof. Ludwig Kripahl     (

Teaching method

There are two hours of lectures, one hour of preparation for the lab exercises and a lab session of two hours each week.

Lectures are problem-driven. They start with a concrete problem, which motivates the presentation of some computer systems topic, some data type or some programming language construct, and end with the complete source code of a program that solves it.

In the lab classes, students design, implement and test programs for solving simple problems in Science and Engineering fields.

Evaluation method

Evaluation Rules

Assessment Components

The assessment consists of two components: the laboratory component and the theoretical-practical component.

***** Laboratory Component and Frequency *****

The laboratory component consists of four exercises and one practical work, carried out in a group of two students (or individually, in justified cases). The practical work will be done mostly outside of class.

The evaluation of the work is done individually, including a quizz during the 2nd test related to the respective work and eventual oral discussion. These evaluation events will affect the final grade given to the work for each student.

The grade of the laboratory component (CompL) is obtained as follows:
    • compL = 0,1 Q1 + 0,1 Q2 + 0,1 Q3 + 0,7 TP  (where Q1, Q2 and Q3 are the three best results of the four exercises).

To obtain frequency it is necessary that CompL ≥ 8.0.

***** Theoretical-Practical Component *****

The theoretical-practical component consists of two tests or an exam (at the time of recourse). The three tests are individual, written and without consultation.

The grade of the theoretical-practical component (CompTP) is 0.4 T1 + 0.6 T2 or the exam (Ex).

To obtain approval, CompTP ≥ 8.0 is required.

*****   Final grade   *****
The final grade (NF) of students with frequency is calculated as follows:
    • NF = CompTP,                     if CompTP < 8.0;
    • NF = 0.3 CompL + 0.7 CompTP,    if CompTP ≥ 8.0 .

All grades are rounded to the nearest hundredths, on a scale from 0 to 20, except for the final grade (NF) which is rounded to the nearest integer.

***** Rankings Obtained in Previous Years *****

Students who attended UC last year can maintain this CompL grade. They should not enroll in practical classes. If you enroll in practical classes, the CompL grade will be the one obtained this year (you can attend practices as long as there are seats in the room).

Previous frequencies are not valid!

Subject matter

Introduction: Problems, algorithms, programs, and computers. Goals and components of computer systems. Program execution. The interpreter.

Fundamental Concepts of Programming: Constants, variables and expressions. Numbers and strings. Predefined functions. Assignment statement and sequence of statements. Levels of abstraction in problem-solving. Functions. Source code files. Program life cycle. Kinds of error. Unit testing. FOR loops. Vectors. The IF statement. Relational and logical operators. Matrices. Graphics. WHILE loops. File systems. Binary and ASCII files. Structures. Vectors of structures.

Networks and communication protocols. The World Wide Web.

Introduction to databases: the relational model, relations, some basic SQL queries.

Simulation of continuous models.