- ES Español

- EN English

5.1. Introduction to Computing (Mandatory)
- Semester: 1st Sem. Credits: 4
- Hour of this course: Theory: 2 hours; Laboratory: 4 hours;
- Syllabus:
- htmlonly

Español

English - Prerrequisites: None
5.1.1. Justification ↑ Back to top
This is the first course in the sequence of introductory courses to Computer Science. This course introduces participants to the fundamental concepts of programming using Python. Topics include data types, control structures, functions, lists, recursion, and the mechanics of execution, testing, and debugging. Programming is one of the pillars of Computer Science; any professional in the area will need to program to materialize their models and proposals.
5.1.2. Generales Goals ↑ Back to top
- Introduce the fundamental concepts of programming.
- Develop the ability of abstraction using a programming language.
- Develop problem-solving skills through algorithmic thinking.
- Understand basic data structures and their applications.
- Master the Python programming language for problem solving.
5.1.3. Contribution to Outcomes ↑ Back to top
- AG-C08) Problem Analysis: Identifies, formulates, and analyzes complex computing problems. (Familiarity)
- AG-C12) Applies computer science theory and software development fundamentals to produce computer-based solutions. (Usage)
5.1.4. Content ↑ Back to top
5.1.4.1. Introduction to Programming and History (4 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Zelle, 2010; Guttag, 2013; Brookshear and Brylow, 2019a)
Topics
- Brief history of computing and programming languages.
- Overview of Python programming language.
- Programming environments and tools.
- Basic program structure and execution.
- Writing, running, and debugging simple programs.
Learning Outcomes
- Identify important trends in the history of computing. [Familiarity]
- Discuss the historical context of programming language paradigms. [Familiarity]
- Compare daily life before and after personal computers and the Internet. [Assessment]
- Write, compile, and run a simple Python program. [Usage]
5.1.4.2. Type Systems Fundamentals (6 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Zelle, 2010; Guttag, 2013)
Topics
- A type as a set of values together with a set of operations:
- Primitive types (e.g., numbers, Booleans)
- Compound types built from other types (e.g., records/structs, unions, arrays, lists, functions, references using set operations) enumerate
- Type safety and errors caused by using values inconsistently given their intended types
- Goals and limitations of static and dynamic typing: detecting and eliminating errors as early as possible.
- Primitive data types in Python (int, float, str, bool).
- Type conversion and casting.
Learning Outcomes
- Describe, for both a primitive and a compound type, the values that have that type [Familiarity]
- Describe examples of program errors detected by a type system [Familiarity]
- Use types and type-error messages to write and debug programs [Usage]
- Explain Python's dynamic typing system. [Familiarity]
5.1.4.3. Object-Oriented Programming Fundamentals (14 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Zelle, 2010; Guttag, 2013; Brookshear and Brylow, 2019a)
Topics
- Imperative programming as a subset of object-oriented programming.
- Definition of classes: fields, methods, and constructors.
- Dynamic vs static properties.
- Variables, expressions, and assignments.
- Input and output operations.
- Conditional statements (if, elif, else).
- Iteration structures (for loops, while loops).
- Nested loops and loop control statements.
- Exception handling basics.
Learning Outcomes
- Compose a class through design, implementation, and testing to meet behavioral requirements [Usage]
- Predict and validate control flow in a program using dynamic dispatch [Assessment]
- Use object-oriented encapsulation mechanisms such as interfaces and private members [Usage]
- Implement programs using conditional and iterative structures. [Usage]
- Debug programs with syntax and logical errors. [Usage]
- Design and implement simple algorithms using loops. [Usage]
5.1.4.4. Functions and Parameter Passing (10 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Zelle, 2010; Guttag, 2013; Hunt and Thomas, 1999)
Topics
- Function definition and invocation.
- Parameter passing mechanisms (by value, by reference).
- Return values and multiple returns.
- Variable scope and lifetime (local, global, nonlocal).
- Recursion fundamentals.
- Lambda expressions and higher-order functions.
- Functions as first-class objects.
- Documentation and testing of functions.
Learning Outcomes
- Define and implement functions with proper parameter passing. [Usage]
- Explain the difference between pass-by-value and pass-by-reference. [Familiarity]
- Implement recursive solutions to simple problems. [Usage]
- Use lambda expressions for functional programming constructs. [Usage]
- Design functions with appropriate scope and documentation. [Assessment]
5.1.4.5. Basic Data Structures (10 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Zelle, 2010; Guttag, 2013)
Topics
- Lists and list operations (indexing, slicing, mutability).
- Tuples and immutability.
- Dictionaries and key-value mapping.
- Sets and set operations.
- Strings as sequences.
- List comprehensions and generator expressions.
- Basic searching and sorting algorithms.
- Introduction to algorithmic complexity for basic operations.
Learning Outcomes
- Implement programs using lists, dictionaries, and sets. [Usage]
- Choose appropriate data structures for given problems. [Assessment]
- Explain the trade-offs between different data structures. [Familiarity]
- Implement basic search and sort operations on lists. [Usage]
5.1.4.6. Object-Oriented Programming Fundamentals (10 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Zelle, 2010; Guttag, 2013)
Topics
- Subclasses, inheritance (including multiple inheritance), and method overriding.
- Dynamic dispatch: definition of method-call.
- Object-oriented idioms for encapsulation:
- Privacy, data hiding, and visibility of class members.
- Interfaces revealing only method signatures.
- Abstract base classes, traits and mixins. enumerate
- Classes and objects in Python.
- Attributes and methods.
- Inheritance and polymorphism basics.
- Encapsulation and information hiding.
Learning Outcomes
- Build a simple class hierarchy utilizing subclassing that allows code to be reused for distinct subclasses [Usage]
- Explain the relationship between object-oriented inheritance (code-sharing and overriding) and subtyping (the idea of a subtype being usable in a context that expects the supertype) [Familiarity]
- Compare and contrast the benefits and costs/impact of using inheritance (subclasses) and composition (specifically, how to base composition on higher order functions) [Assessment]
- Design and implement simple classes in Python. [Usage]
- Explain the benefits of OOP for code organization. [Familiarity]
5.1.4.7. Algorithmic Strategies (6 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Guttag, 2013; Cormen et al., 2009)
Topics
- Paradigms:
- Brute-Force (e.g., linear search, selection sort, traveling salesperson, knapsack)
- Decrease-and-Conquer:
- By a Constant (e.g., insertion sort, topological sort)
- By a Constant Factor (e.g., binary search)
- By a Variable Size (e.g., Euclid's) enumerate
- Divide-and-Conquer (e.g., binary search, quicksort, mergesort, Strassen's)
- Greedy (e.g., Dijkstra's, Kruskal's, Knapsack)
- Transform-and-Conquer:
- Instance simplification (e.g., find duplicates via list presort)
- Representation change (e.g., heapsort)
- Problem reduction (e.g., least-common-multiple, linear programming)
- Dynamic programming (e.g., Floyd's, Marshall, Bellman-Ford) enumerate
- Space vs time tradeoffs (e.g., hashing) enumerate
- Iteration vs recursion (e.g., factorial, tree search)
- Problem decomposition strategies.
- Algorithm design techniques.
- Debugging and testing strategies.
- Tracing program execution.
Learning Outcomes
- For each of the paradigms in this unit:
- Explain its definitional characteristics
- Explain an example that demonstrates the paradigm including how this example satisfies the paradigm's characteristics. enumerate [Familiarity]
- Give examples of iterative and recursive algorithms that solve the same problem, explain the benefits and disadvantages of each approach [Usage]
- Evaluate whether a greedy approach leads to an optimal solution [Assessment]
- Apply systematic debugging techniques to locate and fix errors. [Usage]
- Analyze algorithm complexity for simple problems. [Familiarity]
5.1.4.8. Modern Development Methods and Tool Usage (4 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Zelle, 2010; Hunt and Thomas, 1999)
Topics
- Using modern programming environments (IDEs, notebooks).
- Code search and reuse best practices.
- Using standard libraries and APIs.
- Debugging and testing techniques.
- Version control basics.
- Code documentation and style guidelines.
- Virtual environments and package management.
Learning Outcomes
- Use modern development tools effectively. [Usage]
- Apply code reuse principles through libraries and APIs. [Usage]
- Debug and test programs systematically. [Usage]
- Follow coding standards and documentation practices. [Familiarity]
- Manage Python packages and environments. [Familiarity]
5.1.5. Bibliography ↑ Back to top
Zelle, J. M. (2010). Python Programming: An Introduction to Computer Science. Franklin, Beedle & Associates Inc, 2nd edition.
Guttag, J. V. (2013). Introduction to Computation and Programming Using Python. MIT Press, 1st edition.
Brookshear, J. G. and Brylow, D. (2019a). Computer Science: An Overview. Pearson, global edition edition.
Hunt, A. and Thomas, D. (1999). The Pragmatic Programmer: From Journeyman to Master. Addison-Wesley, 1st edition.
Cormen, T. H., Leiserson, C. E., Rivest, R. L., and Stein, C. (2009). Introduction to Algorithms. MIT Press, 3rd edition.