This version of the course guide is provisional until the period for editing the new course guides ends.

Logo UAB

Scientific Programming

Code: 107925 ECTS Credits: 6
2025/2026
Degree Type Year
Mathematics FB 1

Contact

Name:
Francesc Xavier Xarles Ribas
Email:
xavier.xarles@uab.cat

Teachers

Jaume Coll Guerrero
Joaquim Roé Vellvé
Marc Masdeu Sabate

Teaching groups languages

You can view this information at the end of this document.


Prerequisites

None


Objectives and Contextualisation


Familiarize oneself with the use of an algebraic manipulator. This manipulator must become a common tool in the study of many other subjects.

Get started in computer programming, specially in the framework of scientific computing.

Understanding how the computer work, in the most relevant aspects for programming.

Learn to code in Python and C.


Learning Outcomes

  1. CM05 (Competence) Discriminate, from among different algorithms, the most relevant one to solve an elementary mathematical problem.
  2. KM08 (Knowledge) Identify basic calculation algorithms.
  3. KM09 (Knowledge) List the fundamental mathematical principles of programming.
  4. KM10 (Knowledge) Describe the most relevant principles of computing and programming, including components, memory, processing and input/output.
  5. SM07 (Skill) Use a symbolic calculation program to solve simple problems in other branches of mathematics, such as algebra, geometry, and graph theory.
  6. SM08 (Skill) Programme simple algorithms.

Content


First part: Python and Sagemath

- Numbers, strings and variables.
- Lists, sets and comprehension.
- Conditionals.
- Iterators and ranges.
- Tuples and dictionaries.
- Functions and programs.
- Recursion.
- Error control.
- Design and analysis of algorithms.
- Integers and congruences.
- Numerical and algebraic calculations.
- Plot.
- Solving equations.
- Objects and Classes.
- Vectors and matrices.

Second part: C

- Compiled languages. Source code and executable program.
- C program structures: iterative, alternative, functions.
- Information coding. Types of variables and constants.
- Vectors and derived types.
- Memory management. Pointers.
- Input and output: console and file interaction.
- Libraries

 


Activities and Methodology

Title Hours ECTS Learning Outcomes
Type: Directed      
C 30 1.2 CM05, KM08, KM09, KM10, SM07, SM08, CM05
Python and Sagemath 26 1.04 CM05, KM08, KM09, KM10, SM07, SM08, CM05
Type: Autonomous      
Assestment 40 1.6 CM05, KM08, KM09, KM10, SM07, SM08, CM05
Preparation exam C 20 0.8 CM05, KM08, KM09, KM10, SM07, SM08, CM05
Preparation exam Pyhton and Sagemath 20 0.8 CM05, KM08, KM09, KM10, SM07, SM08, CM05

There will be 13 practical sessions in the first semester, and 15 practical sessions in the second semester, lasting each session 2 hours.

The students can communicate with the teachers through the email for personal questions, always sent from the institutional address @autonoma.cat. For questions of general interest, the students should use the forums in the Moodle Classroom.

In all aspects of teaching / learning activities, the best efforts will be made by teachers and students to avoid language and situations that can be interpreted as sexist. In order to achieve continuous improvement in this topic, everyone should collaborate to show the deviations that you observe regarding this objective.


Note: Within the schedule set by the center or degree program, 15 minutes of one class will be reserved for students to evaluate their lecturers and their courses or modules through questionnaires.

Annotation: Within the schedule set by the centre or degree programme, 15 minutes of one class will be reserved for students to evaluate their lecturers and their courses or modules through questionnaires.


Assessment

Continous Assessment Activities

Title Weighting Hours ECTS Learning Outcomes
Assignment 0.33 6 0.24 CM05, KM08, KM09, KM10, SM07, SM08
Exam C 0,33 4 0.16 CM05, KM08, KM09, KM10, SM07, SM08
Exam Python and Sagemath 0,33 4 0.16 CM05, KM08, KM09, KM10, SM07, SM08

The subject has three assessments:

  • during the first semester of the course, one or more tests will be given for the Python and Sagemath part.
  • during the second semester of the course, one test will be given for the C part, and also there will be submissions of practical exercises.
  • a programming assignment, which will contain an explanation written in Latex, with parts of the code written in Python and parts written in C.


The final grade for the subject will be the weighted sum of the grades for each of the three parts. Each part contributes one third of the overall grade.

There is a minimum grade for each of the parts of 3.5 points out of 10. Therefore, to pass the subject, at least a 3.5 must be obtained for each part, in addition to an average of 5 or higher.

There will be a second call for each of the exams to recover/improve the grade. The submission of this second exam will automatically cancel the grade of the first call. The assignment is not recoverable.

Anyone who has submitted work or taken exams for a total of at least two thirds of the subject will be considered assessable.  Otherwise, it will appear as non-assessable.

For the assignment of Honors, the grades of the second calls will not be taken into account.

VERY IMPORTANT: Assessable work is individual. Copying or allowing a totally or partially copied assessable work or an exam will be penalized with a zero as the final grade for the subject.


Bibliography

During the course, the essential material will be provided to follow it. As an additional material, we recommend:

SAGE. http://www.sagemath.org/help.html

Tobias Oetiker, Hubert Partl, Irene Hyna and Elisabeth Schlegl. The not so short introduction to LaTeX 2e. Tobi.oetiker.ch/lshort/lshort.pdf

George Grätzer, More Math Into LaTeX, Springer, 2016

CProgramming. http://www.cprogramming.com/tutorial/c-tutorial.html (The amount of tutorials on language C on the internet and in the form of a book is enormous, and in a variety of languages)

B.W. Kernighan, Ritchie, D.M., The C programming language. 2nd edition. 1988

 


Software

We will use SageMath, Pyhton, Latex and C. During the course we will give the necessary instructions to install the programs, as well as recommendations on possible editors.


Groups and Languages

Please note that this information is provisional until 30 November 2025. You can check it through this link. To consult the language you will need to enter the CODE of the subject.

Name Group Language Semester Turn
(PLAB) Practical laboratories 1 Catalan annual morning-mixed
(PLAB) Practical laboratories 2 Catalan annual morning-mixed
(PLAB) Practical laboratories 3 Catalan annual morning-mixed
(PLAB) Practical laboratories 4 Catalan annual morning-mixed