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.
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).
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.
Sequences (lists, tuples and strings) and sets. Iteration and slicing. List comprehension.
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.
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