
Scientific Programming
Code: 107925Credits: 6
| Degree programme | Type | Course |
|---|---|---|
| Mathematics | FB | 1 |
Contact lecturer
- Name :
- Joaquim Roé Vellvé
- Email :
- joaquim.roe@uab.cat
Teaching staff
- Martí Prats Soler
- Jaume Coll Guerrero
- Joaquim Roé Vellvé
Group languages
You can consult this information at the end of the document.
Prerequisites
None
Objectives
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
- CM05 (Discriminate, from among different algorithms, the most relevant one to solve an elementary mathematical problem.) Discriminate, from among different algorithms, the most relevant one to solve an elementary mathematical problem.
- KM08 (Identify basic calculation algorithms.) Identify basic calculation algorithms.
- KM09 (List the fundamental mathematical principles of programming.) List the fundamental mathematical principles of programming.
- KM10 (Describe the most relevant principles of computing and programming, including components, memory, processing and input/output.) Describe the most relevant principles of computing and programming, including components, memory, processing and input/output.
- SM07 (Use a symbolic calculation program to solve simple problems in other branches of mathematics, such as algebra, geometry, and graph theory.) Use a symbolic calculation program to solve simple problems in other branches of mathematics, such as algebra, geometry, and graph theory.
- SM08 (Programme simple algorithms.) Programme simple algorithms.
Contents
First part: Python and Sagemath
- Numbers, strings and variables.
- Lists, sets and comprehension.
- Iteration and alternative construction.
- Tuples and dictionaries.
- Functions and 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 and recursion
- Information coding. Types of variables and constants.
- Arrays and derived types.
- Memory management. Pointers.
- Input and output: console and file interaction.
- Libraries
Learning activities and methodology
| Title | Hours | ECTS | Learning outcomes |
|---|---|---|---|
| Preparation exam Pyhton and Sagemath | 25 | 1 | CM05, KM08, KM09, KM10, SM07, SM08 |
| Python and Sagemath | 26 | 1.04 | CM05, KM08, KM09, KM10, SM07, SM08 |
| Assestment | 39 | 1.56 | CM05, KM08, KM09, KM10, SM07, SM08 |
| Preparation exam C | 25 | 1 | CM05, KM08, KM09, KM10, SM07, SM08 |
| C | 30 | 1.2 | CM05, KM08, KM09, KM10, SM07, SM08 |
There will be 13 practical sessions in the first semester, and 15 practical sessions in the second semester, lasting each session 2 hours.
The main part of the practical sessions consists in personal work of each student on the computer, following a script prepared and explained by the instructors.
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.
Assessment
Continuous assessment activities
| Title | Weight | Hours | ECTS | Learning outcomes |
|---|---|---|---|---|
| Assignment | 0.24 | 1 | 0.04 | CM05, KM08, KM09, KM10, SM07, SM08 |
| Exam Python and Sagemath | 0,38 | 2 | 0.08 | CM05, KM08, KM09, KM10, SM07, SM08 |
| Exam C | 0,38 | 2 | 0.08 | 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. There will be an oral assessment of the assignment.
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. The use of "Artificial Intelligence" technologies in exams is forbidden. In the programming assignment it will be regulated. Parts of the work generated using this technology will have to be clearly specified, along with the tools used, and a critical reflection on how they influenced both the process and the final outcome of the activity will be included.
Failure to disclose the use of AI will be considered a breach of academic integrity and will be penalized in the grade or, in more serious cases, more severe disciplinary sanctions.
SINGLE ASSESSMENT: Students under the "single assessment" need to hand in the programming assignment and solve a unique (3 hour) exam on the whole content of the course, followed by an interview on the programming assignment.
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.
Course groups and languages
The information provided is provisional until November 30. After this date, you will be able to consult the language of each group through this link. To access the information, you will need to enter the course CODE
| Type of teaching | Group | Language | Semester | Shift |
|---|---|---|---|---|
| (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 |