Applied Programming I

You are here

Credits
6
Types
Compulsory
Requirements
This subject has not requirements
Department
CS
Mail
The course presents the elements of a computer programming language and the basic algorithmic foundations for working with scalar and structured data. During the course students will acquire the knowledge to deal with programming problems of small and medium complexity.
The course covers basic concepts and techniques for building programs in imperative languages.
At the end of the course, students:

1. will know the basic constituents of imperative languages: variables, types, expressions, conditionals and iterations.
2. will be able to use and design procedures (actions and functions) to encapsulate sub-problem solutions.
3. will be able to use the descending design methodology to give solutions to problems of medium difficulty.
4. will be able to use vectors and dictionaries to store structured information and as a basis for the design of data structures.
5. will know and be able to reproduce and properly use some fundamental algorithms, such as dichotomous search or elementary vector sorting algorithms.

The programming language used in this couse is Python, although the emphasis is not on learning the details of the language but on solving algorithmic problems and building structured programs.

Teachers

Person in charge

  • Lluis Padro Cirera ( )

Weekly hours

Theory
2
Problems
2
Laboratory
0
Guided learning
0
Autonomous learning
6

Learning Outcomes

Learning Outcomes

Knowledge

  • K3 - Identify the mathematical foundations, computational theories, algorithmic schemes and information organization principles applicable to the modeling of biological systems and to the efficient solution of bioinformatics problems through the design of computational tools.
  • K4 - Integrate the concepts offered by the most widely used programming languages in the field of Life Sciences to model and optimize data structures and build efficient algorithms, relating them to each other and to their application cases.

Skills

  • S7 - Implement programming methods and data analysis based on the development of working hypotheses within the area of study.
  • S8 - Make decisions, and defend them with arguments, in the resolution of problems in the areas of biology, as well as, within the appropriate fields, health sciences, computer sciences and experimental sciences.

Competences

  • C6 - Detect deficiencies in the own knowledge and overcome them through critical reflection and the choice of the best action to expand this knowledge.

Objectives

  1. Understand how to build a program and use tools the necessary tools: console, editor and compiler.
    Related competences: K4, C6,
  2. Understand the syntax and semantics of basic expressions and instructions in an imperative programming language (Python).
    Related competences: K4, C6,
  3. Understand the concepts of function, procedure and parameter passing, to be able to
    use functions and procedures to develop programs.
    Related competences: K4, C6,
  4. Understand lists, dictionaries, and sets, and identify how to use the appropriately to solve problems
    Related competences: K3, K4, S7, C6,
  5. Compare solutions regarding time and memory use and choose the most appropriate solutions for simple cases.
    Related competences: K3, S7, S8, C6,
  6. Understand search and traversal schemas and appropriately apply them to solve problems.
    Related competences: K3, S7, C6,
  7. Understand binary search, and basic sort algorithms (insertion, selection, bubblesort, mergesort)
    Related competences: K3, S8, C6,

Contents

  1. Basic Programming concepts
    Introduction: algorithm, program
    - variable, expression,
    - assignment. I/O. Conditional
    - Iiterative statements.

    Solving problems with scalar data
  2. Iterative schemas
    Traversal & Search schemas.
    Invariants
  3. Functions and Procedures
    Function design and parameter passing.
    Function design examples.
  4. Lists
    Representation of data structures with lists. Traversal and search algorithms on lists. Python memory management of Lists
  5. Matrices
    Basic algorithms on matrices: sum, symmetric, transpose, multiplication.
    Python memory management of Matrices
  6. Dictionaries
    Memory representation of dictionaries. Hashing concept.
    Mutability. Tuples.
    Counters. Sets.
    FrozenSets
  7. Computational Complexity
    Basic notions of computational complexity
  8. Sort algorithms
    Bubble sort
    Insertion sort
    Selection sort
    Mergesort
    sorting Python structures using lambda as key
  9. Standard Python Input
    readline
    readlines
    strip
    split

Activities

Activity Evaluation act


Basic concepts of programming

Introduction: algorithm, program, variable, expression, assignment. I/O. Conditional Iiterative statements. Solving problems with scalar data
Objectives: 1 2
Contents:
Theory
4h
Problems
4h
Laboratory
0h
Guided learning
0h
Autonomous learning
12h

Iterative schemas

Traversal & Search problems Invariants. Loop design
Objectives: 2 6
Contents:
Theory
4h
Problems
4h
Laboratory
0h
Guided learning
0h
Autonomous learning
12h

Functions.

Functions: design and parameter passing. Function design examples.
Objectives: 3
Contents:
Theory
4h
Problems
4h
Laboratory
0h
Guided learning
0h
Autonomous learning
12h

Lists and Matrices

Representation of data structures with lists. Traversal and search algorithms on lists. Python memory management of Lists Matrices. Basic algorithms on matrices: sum, symmetric, transpose, multiplication. Python memory management of Matrices
Objectives: 4
Contents:
Theory
4h
Problems
4h
Laboratory
0h
Guided learning
0h
Autonomous learning
12h

Dictionaries and Sets

Dictionaries. Memory representation. Hashing concept. Counters. Sets. Memory representation. FrozenSets.
Objectives: 4 5
Contents:
Theory
4h
Problems
4h
Laboratory
0h
Guided learning
0h
Autonomous learning
12h

Computational Complexity

Basic notions of computational complexity
Objectives: 5 6 7
Contents:
Theory
2h
Problems
2h
Laboratory
0h
Guided learning
0h
Autonomous learning
6h

Sort algorithms

Bubble sort Insertion sort Selection sort sorting Python structures. Using lambda as key
Objectives: 7
Contents:
Theory
4h
Problems
4h
Laboratory
0h
Guided learning
0h
Autonomous learning
12h

Data Structure Design

Representing complex data. lists of lists, lists of dictionaries, dictionaries with lists, embedded dictionaries. dicctionaries with structured keys (tuples/frozensets) Problem solving via appropriate data structures
Objectives: 4 5
Contents:
Theory
4h
Problems
4h
Laboratory
0h
Guided learning
0h
Autonomous learning
12h

Teaching methodology

During theoretical sessions, the professor will expose programming concepts, combined with examples and problem solving.

During problem-solving sessions, students will work on their own solving problems with an online platform (El Jutge), under supervison and assistance of the professor when needed

Evaluation methodology

There will be two exams. A mid-term exam and a final exam
In addition, there will be some evaluable problem tests taken during problem sessions, announced in advance.

FinalScore = 0.10*NP + 0.90*max(EF, 0.4*EP+0.6*EF)

where:
NP : Problem score. Short problem tests taken during problem sessions
EP: Partial exam score
EF: Final exam score

Students failing the course but satisfying the following conditions may opt to reevaluation:
- Have attended and delivered both EP & EF examens, plus at least 50% of the problem tests (NP)
- Have obtained an average of at least 3.5
- Reevaluation will consists of an additional exam, the grade of which will replace EF score.

Bibliography

Basic:

Complementary: