Computer Programming I
Keywords |
Classification |
Keyword |
OFICIAL |
Computational Methods |
Instance: 2023/2024 - 2S 
Cycles of Study/Courses
Acronym |
No. of Students |
Study Plan |
Curricular Years |
Credits UCN |
Credits ECTS |
Contact hours |
Total Time |
L.EM |
271 |
Syllabus |
1 |
- |
6 |
52 |
162 |
Teaching language
Portuguese
Objectives
Aims: This is a course that gives students the opportunity to be aware of the essential concepts to construct algorithms, which make them able to solve a variety of problems, essencialy focused on vector and matrix calculation, numerical integration and polynomial approximation. These are essential tools to solve engineering problems. The programming language that is going to be used to develop and test programs is Python. In the second part of the semester MATLAB language will be introduced.
Learning outcomes and competences
By the end of the semester, students should be able to use other programming languages than the ones that have been taught during the semester, and develop programs within Mechanical Engineering.Learning Outcomes:
- Decompose an initial problem into simpler problems and create an algorithm to solve simple problems;
- Apply concepts and techniques necessary for the design of algorithms to solve some types of problems;
- Design algorithms for solving basic numerical problems involving concepts of vector and matrix calculus;
- Develop programs in Python language and Matlab environment using the basic instructions correctly;
- Test a program, interpret and analyze the obtained results.
Working method
Presencial
Pre-requirements (prior knowledge) and co-requirements (common knowledge)
Knowledge of algebra and mathematical logic.
Program
The main goal of this course is to provide students with basic knowledge in algorithms and programming structures in order to solve basic numerical problems involving matrix calculus. In the first part of the semester, classes are focused on the algorithmic language and programming language adopted, PYTHON, and the second part is dedicated to MATLAB.
- FUNCTIONING OF A COMPUTER: Constituent units. Running a program. Interpreter;
- ALGORITHMS: Algorithmic language. General organization of an algorithm. Data types and operators. Data input, data output and attribution structure. Conditional and repeating instructions. Indexed variables;
- INTRODUCTION TO PYTHON PROGRAMMING LANGUAGE: Sequencing. Declaration of variables and data types: focus on numerical data. Arithmetic and relational operators. Assignment statement. Data input and output. Selection structures. Repetition structures. Data structures. Subprograms: functions and procedures. Predefined functions in Python. File Handling: files, methods on files and text files vs. Binaries. String manipulation;
- INTRODUCTION TO MATLAB: MATLAB Session. Basic data structures. Programming in MATLAB. Advanced data structures. Graphic representation. Development of MATLAB applications in order to solve basic engineering problems.
Mandatory literature
Cristina Faria M. Guedes; Apontamentos do Matlab disponibilizados nos conteúdos do SIFEUP, 2015
Peter Wentworth;
Learning with Python 3 (RLE)
Charles R. Severance;
Python for everybody
Complementary Bibliography
John V. Guttag ;
Introduction to Computation and Programming Using Python , MIT, 2016
John Zelle; Python Programming: An introduction to Computer Science, 2017
Teaching methods and learning activities
Theoretical classes: Lectures with Power Point presentation. Learning basic concepts for designing algorithms and implementation in Python and MATLAB language. Application of basic concepts to practical cases. In addition, each week, several exercises are proposed and discussed in laboratory (PL) classes. In these PL classes, exercises are solved to consolidate subjects introduced in theoretical classes. Students will be encouraged to develop and test their own programs. Students joined in groups of two or three elements will develop programming Projects in Python. The MATLAB work environment is introduced in the second part of the semester.
Hours per week -1T + 3h PL
Estimated total hours - 52h
Practical-laboratory classes: Algorithm design (20h), implementation in Python (20h) and MATLAB (12h).
Exam Preparation - 62h
Software
MATLAB
Visual Studio
keywords
Physical sciences > Mathematics > Algorithms
Technological sciences > Technology > Computer technology > Software technology
Technological sciences > Engineering > Simulation engineering
Physical sciences > Mathematics > Algorithms
Technological sciences > Technology > Computer technology > Software technology
Evaluation Type
Distributed evaluation with final exam
Assessment Components
Designation |
Weight (%) |
Exame |
60,00 |
Participação presencial |
10,00 |
Teste |
30,00 |
Total: |
100,00 |
Amount of time allocated to each course unit
Designation |
Time (hours) |
Estudo autónomo |
84,00 |
Frequência das aulas |
48,00 |
Trabalho laboratorial |
30,00 |
Total: |
162,00 |
Eligibility for exams
1) Not exceed the absence limit allowed in Article 4 of the General Evaluation Rules of FEUP.
Calculation formula of final grade
The assessement is composed by four components (T1, T2, T3 and T4):
The final classification (CF) will be calculated according to the rule: CF=0.10 (T1 ex)+0.20 (T2 ex) + 0.60 (T2, final exam) + 0.10 (classes classification).
T1 - an algorithm exam;
T2 - an computer exam;
T3 - a written exam;
T4 - classes classification.
Students must a final classification, CF>=9.5 and get frequency according to FEUP rules.
Remark:
i) Students with a final classification greater than 18 points are subjected to an extra oral or written test.
Examinations or Special Assignments
Not applicable.
Special assessment (TE, DA, ...)
Students should choose between attending all the assessment components or a final exam (20).
Classification improvement
Students can improve the classification obtained by performing a written exam (20).