Informatik - FS 18

Course catalog: 252-0832-00L
Lecturers: Hermann Lehner, Malte Schwerhoff

The course covers the fundamental concepts of computer programming with a focus on systematic algorithmic problem solving. Taught language is C++. No programming experience is required. Primary educational objective is to learn programming with C++. When successfully attended the course, students have a good command of the mechanisms to construct a program. They know the fundamental control and data structures and understand how an algorithmic problem is mapped to a computer program. They have an idea of what happens "behind the secenes" when a program is translated and executed. Secondary goals are an algorithmic computational thinking, undestanding the possibilities and limits of programming and to impart the way of thinking of a computer scientist.

26 June 2018

The solution to the sample exam is now online.

14 June 2018

We published one previous exam for you to practice.

17 May 2018

Third Bonux exercise released! Good luck!

Expression language

19 Apr 2018

Second Bonux exercise released! Good luck!


15 Mar 2018

First Bonux exercise released! Good luck!


If you want to implement it locally, here are the two required header files grid.h and ai.h. We will not provide our (stupid) AI implementation as it's too embarrasing taking away the fun of figuring out a clever AI.

9 Mar 2018

Vielen Dank an Prof. Dr. Bernd Gaertner und Dr. Michael Hoffmann zur Bereitstellung des Skripts

Skript zur Vorlesung (English)

23 Feb 2018

Registration to the exercise sessions is now open. Follow this link to register and open the first exercise.

22 Feb 2018

Registration to the Slack channel is open.

Slack Channel Invitation

Week Date Topic Lecture Additional Material Exercises PPrerequisites to unlock bonus exercises BBonus exercises
1 20.02 (Engineering Tool) Introduction
22.02 Expressions, Statements, Integer arithmetic Flashcards Code Tic-tac-toe
2 01.03 Boolean functions, Defensive programming, Control flow I Flashcards, Demos Code
3 08.03 Control flow II, Floating point arithmetic I Flashcards Code
4 15.03 Floating point arithmetic II, Functions I Flashcards Code Tic-tac-toe
5 22.03 Functions II, References I Flashcards Code Sudoku
6 29.03 References II, Arrays and strings I Flashcards Code
  • Exercise 6
  • Summary 6
  • 7 12.04 Arrays and strings II, Pointers, algorithms, iterators and containers I Flashcards Code
    8 19.04 Pointers, algorithms, iterators and containers II Code Sudoku
    9 26.04 Recursion Flashcards Code
  • Exercise 9
  • Summary 9
  • Slides (Recursion trees)
  • Slides (Exercises)
  • Expression language
    10 03.05 Structs, Classes I Flashcards Code
  • Exercise 10
  • Summary 10
  • Slides (Struct geometry)
  • Slides (Tribool)
  • 11 10.05 No lecture (Ascension Day) Note: 15-16/05 shorter
    exercise & QA session
    12 17.05 Classes II Flashcards Code
  • Exercise 11
  • Summary 11
  • Expression language
    13 24.05 Inheritance and polymorphism Flashcards Code Exercise 12
    14 31.05 Repetition -
    15 -

    Registration for the exercise session

    The registration for exercise sessions is not opened yet. We will provide a link to register online during the first week of the semester.

    Time and place

    The following exercise sessions are offered:

    Time Place Assistant
    Tue 14:15-16:00 IFW A 32.1 Ben Weber
    Wed 13:15-15:00 HG D 7.1 Gian Andrea Müller
    Wed 13:15-15:00 IFW A 32.1 Ivan Ovinnikov
    Wed 13:15-15:00 ML J 34.1 Benjamin Rothenberger
    Wed 13:15-15:00 ML J 37.1 Oliver Glauser
    Wed 13:15-15:00 NO D 11 Grzegorz Malczyk
    Wed 13:15-15:00 NO E 39 Cedric Tompkin
    Wed 13:15-15:00 IFW C 31 Leonhard Helminger
    Wed 13:15-15:00 LEE D 101 Luc Holzherr
    Wed 13:15-15:00 ML H 43 Mohammed Khouni
    Wed 13:15-15:00 ML H 41.1 * Moisés Torres
    Wed 13:15-15:00 ML F 34 * Irene Baeza Rojo
    Wed 13:15-15:00 LEE D 105 Zoltan Tschirren
    Wed 13:15-15:00 ETZ G 91 * Yifan Wang
    Wed 13:15-15:00 ETZ H 91 Kailin Huang
    Wed 13:15-15:00HG D 7.2 Daniel Bogado Duffner
    Wed 15:15-17:00 HG D 7.2 Rafael Wampfler
    Wed 15:15-17:00 ML J 37.1 Jonas Lauener
    Wed 15:15-17:00 ML H 41.1 * Pelin Dogan
    Wed 15:15-17:00 IFW C 31 Simone Meyer
    Wed 15:15-17:00 NO E 39 * Byungsoo Kim
    Wed 15:15-17:00 LEE D 101 Maximilian Holst
    Wed 15:15-17:00 ETZ K 91 Bosshard Yvan

    * The session will be held in English

    Old exam

    This year, the course has changed format to be closer to the Informatik I course from D-ITET. For this reason, we provide one old exam from D-ITET and you can expect a similar exam structure in terms of length and number of exercises. Notice, however, that you will have 90 minutes to solve it.

    Bonus exercises

    This year there will be 3 bonus exercises during the semester (see the Agenda for the schedule). By solving these exercises you will get extra points in the final exam. In order to access the bonus exercises you need to unlock them in Code Expert by solving assignments from previous weeks and earning enough experience points (XP).


    For questions about the lecture content of about a specific exercise you can contact your assigned assistant. For questions of general interest use the Slack channel. For administrative questions you can contact the Head TA, Marco Ancona.

    To facilitate the introduction to the lecture, especially for beginners in programming, we will provide an introductory tutorial, which can be completed autonomously. We recommend to complete it early in the semester.

    C++ Tutorial Öffnen

    Hint: The tutorial is available in both german and english. You can switch the language any time.

    Bjarne Stroustrup: Einführung in die Programmierung mit C++, Pearson Studium, 2010 | Also available online from the ETH Domain

    Stephen Prata, C++ Primer Plus, Sixth Edition, Addison Wesley, 2012

    Andrew Koenig and Barbara E. Moo: Accelerated C++, Addison-Wesley, 2000.

    Other useful resources