This course is the introduction to programming for new students of the AI degree. The course will revolve around the concept of Abstraction, emphasizing the process by which one is able to solve problems using either function-based abstraction or data-based abstraction.
Person in charge
Jordi Delgado Pin (
Jose Luis Balcázar Navarro (
CT4 [Avaluable] - Teamwork. Be able to work as a member of an interdisciplinary team, either as a member or conducting management tasks, with the aim of contributing to develop projects with pragmatism and a sense of responsibility, taking commitments taking into account available resources.
CT6 [Avaluable] - Autonomous Learning. Detect deficiencies in one's own knowledge and overcome them through critical reflection and the choice of the best action to extend this knowledge.
CE02 - To master the basic concepts of discrete mathematics, logic, algorithmic and computational complexity, and its application to the automatic processing of information through computer systems . To be able to apply all these for solving problems.
CE03 - To identify and apply the basic algorithmic procedures of computer technologies to design solutions to problems by analyzing the suitability and complexity of the proposed algorithms.
CE04 - To design and use efficiently the most appropriate data types and structures to solve a problem.
CE10 - To analyze, design, build and maintain applications in a robust, secure and efficient way, choosing the most appropriate paradigm and programming languages.
CE12 - To master the fundamental principles and models of computing and to know how to apply them in order to interpret, select, assess, model, and create new concepts, theories, uses and technological developments related to artificial intelligence.
CE13 - To evaluate the computational complexity of a problem, identify algorithmic strategies that can lead to its resolution and recommend, develop and implement the one that guarantees the best performance in accordance with the established requirements.
Generic Technical Competences
CG2 - To use the fundamental knowledge and solid work methodologies acquired during the studies to adapt to the new technological scenarios of the future.
CG4 - Reasoning, analyzing reality and designing algorithms and formulations that model it. To identify problems and construct valid algorithmic or mathematical solutions, eventually new, integrating the necessary multidisciplinary knowledge, evaluating different alternatives with a critical spirit, justifying the decisions taken, interpreting and synthesizing the results in the context of the application domain and establishing methodological generalizations based on specific applications.
CG8 - Perform an ethical exercise of the profession in all its facets, applying ethical criteria in the design of systems, algorithms, experiments, use of data, in accordance with the ethical systems recommended by national and international organizations, with special emphasis on security, robustness , privacy, transparency, traceability, prevention of bias (race, gender, religion, territory, etc.) and respect for human rights.
Learn the most basic concepts of programming with functions (simple and high-order) and their use as tools to adapt a programming language to the domain of the problem to be solved
Learn the concept of recursion and how to distinguish iterative and recursive processes defined with recursive functions
Initiate the student in the understanding of the concept of software design
Being able to deal with the idea of an error in a program and using exceptions to cope with these errors
Learn the concept of container and the situations in which it is relevant to use them. Know the cost of its use (informally)
Learn the concept of class and introduce the student to the use of objects and inheritance
Introduce the student to the computation of the complexity of algorithms
Involve the student in the design and implementation of a simple problem collaborating with other students
Building Abstractions with Functions: Functions (simple and high-order). Environments. Execution flow control.
The student is introduced to the main problem-solving mechanism, from a bottom-up point of view, of designing functions that bring the programming language closer to the domain of the problem. The mechanisms of function definition, parameter passing, environment and scope, and the main control structures of the execution flow (conditional, iterative) are studied.
Building Abstractions with Functions: Recursion and examples.
The fact that a function is able to call itself is introduced, and how this leads to recursion as a conceptual mechanism for solving problems, and the idea of process. Recursive functions may define iterative and recursive processes.
Building Abstractions with Functions: Design. Error handling with exceptions.
The concept of designing a program to solve a problem is introduced. The idea of error in a program and how to deal with them by means of the exception mechanism is introduced.
Building Abstraccions with Functions: Examples of solving problems
The concepts introduced so far are reinforced with numerous problems of low and medium difficulty.
Building Abstractions with Data: Data Abstraction
The concept of Data Abstraction is introduced using simple types (pairs, rational numbers), to illustrate the notion of abstraction barrier. The first simple container data structures are introduced.
Building Abstractions with Data: Containers
We start working with containers provided by the programming language: Sequences, Lists, Dictionaries and others implemented within the course, such as Matrices or Trees.
Building Abstractions with Data: Mutability. Iterators and Generators.
The concept of mutability is first seen in relation to lists, and the advantages and disadvantages of having immutable data structures are discussed. Iterators and generators are introduced as new control structures.
Building Abstractions with Data:Objects, Classes, Inheritance, Composition
The first steps are taken towards object orientation through the concept of object and that of class. The concepts of inheritance and composition are also introduced.
A short introduction is made to asymptotic notation and to the complexity in the worst case of some notable algorithms seen during the course.
Building Abstractions with Functions
The student should pay attention to the lecture and he/she should work through the exercises suggested by the lecturer. Objectives:1234 Contents:
Teaching the course is structured in lectures and laboratory sessions.
Teachers will use lectures to introduce the essential contents of the course. In the laboratory sessions the contents of the course will be brought to the computer by carrying out practical problems. The laboratory classes will be a continuation of the lectures, where new concepts will be implemented as they appear in lectures.
Aquest és el curs CS 61A: Structure and Interpretation of Computer Programs, de l'Universitat de Berkeley, en el que aquest curs està basat https://cs61a.org/
La principal referència del llenguatge de programació que fem servir: Python. No és un lloc on aprendre a programar, és un lloc on consultar detalls de les construccions i llibreries del llenguatge https://docs.python.org/3/reference/index.html
Students are expected to have acquired the knowledge and skills defined for the scientific-technical branch of upper secondary school education or equivalent.
Cap modificació respecte a la Guia Docent
Cap canvi respecte a la Guia Docent, donat que les condicions ara mateix i el plà de vacunació (juny 2021) fan pensar en un desenvolupament normal/presencial del curs el proper setembre de 2021. En cas de que les circumstàncies així ho requereixin, les classes, tant de teoria com laboratoris, es farien de manera no presencial.
Cap modificació respecte a la Guia Docent. Les avaluacions serien no presencials només en circumstàncies molt extremes. Fins i tot si les classes són no presencials, s'intentaria que l'avaluació fos presencial.
Cap, donat que les condicions ara mateix i el plà de vacunació (juny 2021) fan pensar en un desenvolupament normal/presencial del curs el proper setembre de 2021. Si no fos possible dur a terme activitats presencials, es farien tant les classses de teoria, com de problemes de forma no presencial amb Meet, així com tots els actes d'avaluació de forma no presencial utilitzant Meet
Where we are
B6 Building Campus Nord
C/Jordi Girona Salgado,1-3
08034 BARCELONA Spain
Tel: (+34) 93 401 70 00