Computers and Programming

Year
0
Academic year
2024-2025
Code
01002420
Subject Area
Physics
Language of Instruction
Portuguese
Mode of Delivery
Face-to-face
Duration
SEMESTRIAL
ECTS Credits
6.0
Type
Elective
Level
1st Cycle Studies

Recommended Prerequisites

Not applicable.

Teaching Methods

This course is taught in a theoretical-practical approach with a great emphasis on the understanding and development of algorithms for real problems, including a first approach to some numerical analysis methods applied to simple physical and engineering problems.
Each class may start with a short presentation of some formal aspects of the language after which the students are asked to solve a set of problems using Python interactively.

Learning Outcomes

Objectives of major importance:
- Acquire a general knowledge about the operation of a digital computer and about data representation.
- Learn to develop simple algorithms to solve given problems.
- Acquire a generic knowledge about the imperative, functional and object-oriented programming paradigms.
- Learn to use a very high level programming language (Python).

Objectives of secondary importance:
- Learn to search the internet for required bibliography and appropriate software tools.
- Acquire an operational knowledge about basic numerical analysis algorithms applied to typical physical systems and engineer problems.
- Learn to develop, with a team, small modular software projects.

Work Placement(s)

No

Syllabus

The architecture (von Neumann model) of a digital computer. Operating systems.
Binary representation of integer and real numbers, text, images and sound.
Introduction to Python programming language.
The attribution instruction. The concept of pointer and aliasing.
Numeric types: integers, long integers, floating point, and complex.
Booleans.
Sequences (lists, tuples and strings) and sets. Iteration and slicing. List comprehension.
Dictionaries.
Flow control instructions.
Functions. Namespaces and scope. Argument passing and return values mechanism.
Imperative and functional programming.
Modules. Files. Formatting. Input and output redirection.
Exceptions and handling instructions.
Object-oriented programming. Class and instantiation. Attributes and methods. Inheritance, encapsulation, and polymorphism. Operator overload. Introspection and metaprogramming.
Recursion. Iterators and generators.
Basic numerical methods applied to engineer problems.

Head Lecturer(s)

Maria Filomena de Osório Pinto dos Santos Figueiredo

Assessment Methods

Assessment
Exam: 100.0%

Bibliography

1. Documentação online do Python:
- Homepage: http://www.python.org
- Tutorial: http://docs.python.org/tutorial/introduction.html
- Tutorial em português: http://turing.com.br/pydoc/2.7/tutorial/introduction.html
2. Learning Python, M. Lutz, D. Ascher, O'Reilly
3. How to think like a computer scientist, A. Downey, J. Elkner & C. Mayers, Green Tee Press
4. Numerical methods in engineering with Python, J Kiusalaas, Cambridge University Press
5. Python for dummies, S. Maruch, A. Maruch, Wiley
6. Computadores e Programação – Apontamentos da disciplina, Helmut Wolters.