Principles of Computer Programming (B-KUL-G0N28A)

This is a translated version. Original version in Dutch.
6 ECTSDutch51 First termCannot be taken as part of an examination contract
Holvoet Tom (coordinator) |  Holvoet Tom |  Vanhoef Mathy
Facultaire POC Wetenschappen

This course offers concepts and techniques to solve and to implement small problems by means of a higher programming language. The course also introduces students to the paradigm of object oriented programming and to the paradigm of functional programming, which are used in the development of larger programs. The course emphasizes the concepts and techniques, rather than the programming language itself.

Final requirements
* Draw up solutions for algoritmic problems by means of functional decompositions ("divide-and-conquer").
* Implement algorithms both in an iterative way and in a recursive way.
* Insight into the internals of data structures such as lists, sets and maps.
* Insight into various algorithms to sort data.
* Reason about the correctness and finiteness of simple algorithms
* Assess the time complexity and the memory complexity of simple algorithms.

No specific knowledge required.


This course unit is a prerequisite for taking the following course units:
H01O9A : Data Base Systems
G0P36B : Computer aided Problem Solving in Physics
H01P5B : Computer Architecture and Software Systems

This course is identical to the following courses:
H01B6B : Fundamentals of Computer Science
X0A06A : Principles of Computer Programming
X0A06B : Principles of Computer Programming

Activities

3 ects. Principles of Computer Programming: Lecture (B-KUL-G0N28a)

3 ECTSDutchFormat: Lecture26 First term
Facultaire POC Wetenschappen

1. Basic programs
   • Implementation of simple programs only involving assignments, conditional statements, input/output and the invocation of predefined functions.
   * Introduction to the architecture of computers and the way they execute programs.
   • Concepts: variables, expressions (both numeric and string), assignments, conditional statements, input/output, function calls.
2. Iterative programs (algorithms)
   • Disciplined development of iterative programs using the paradigm of structured programming and of functional decomposition.
   * Proofs of correctness and of finiteness of simple algorithms (a.o by means of induction over the loop invariant).
   • Assessment of the complexity of simple algorithms, with emphasis on time complexity.
   • Processing of mistakes that occurred during execution.
   • Concepts: iterative statements, structured data types (lists, maps, tupples, sets and matrices), loop invariants and loop variants, exceptions.
3. Recursive programs
   • Recursive implementation of algorithms using the paradigm of divide-and-conquer.
   • Insight into the execution of recursive programs.
   • Concepts: function definitions, parameter binding, local and global scope, documentation, runtime stack.
4. Introduction to object oriented programming
   • Introduction to the structuring concepts of object oriented programming
   • Functions: parameter binding, return values, scope, reuse of functions, stepwise refinement.
   • Concepts: classes, objects, constructors, inheritance.
5. Applications
   • Sorting and searching: insight into various strategies to sort data (iselection sort, bubble sort, insertion sort, counting sort, quick sort, heap sort, merge sort) and to search data (linear search, binary search).
   • Real numbers: insight into rounding errors during computations with floating point numbers.
   • Simple simulation and optimisation problems.

All programs are written in the programming language Python.

In this course, students also get to know the relevance and current challenges of Informatics.

Handbook; slides

Lectures for a large group of students in an auditorium

3 ects. Principles of Computer Programming: Exercises (B-KUL-G0N78a)

3 ECTSDutchFormat: Practical25 First term
Facultaire POC Wetenschappen

Assignments and solutions

Computer session - Practice session

Exercises are solved in an interactive way. The sessions are organized for small groups under supervision of one or more teaching assistants. All exercises are solved on computer.

Evaluation

Evaluation: Principles of Computer Programming (B-KUL-G2N28a)

Type : Exam during the examination period
Description of evaluation : Written
Learning material : List of formulas, Course material


    Part I: theory and small questions
    Part II: programming exercises

    Part I: theory and small questions
    Part II: programming exercises