2019-2020 / INFO0201-1

Introduction to computer programming

Duration

20h Th, 40h Pr

Number of credits

 Bachelor in geography : general6 crédits 
 Bachelor in physics6 crédits 

Lecturer

Peter Schlagheck

Language(s) of instruction

French language

Organisation and examination

Teaching in the second semester

Schedule

Schedule online

Units courses prerequisite and corequisite

Prerequisite or corequisite units are presented within each program

Learning unit contents

This course gives an introduction to the art of programming in C/C++. After a general introduction into the working principle of a computer, the elementary components of the programming language C/C++ will be explained and their appplication will be demonstrated and discussed. Topics of the course in detail: - electronic logic based on transistors - information in terms of bits and bytes - the working principle of a computer - syntax and elementary instructions of C/C++ - algorithmic tools - functions - file handling and compilation - arrays and pointers

Learning outcomes of the learning unit

The principal objectives of the course are - to learn how to realize small programs in order to solve numerical problems, - to get used to the general techniques of programming (loops, functions, arrays, ...), - to know how a computer works in principle, in order to judge what is practicable in programming (e.g. from the memory and CPU point of view), -to prepare for the course "Numerical methods of physics".

Prerequisite knowledge and skills

Planned learning activities and teaching methods

40 hours of practical sessions in front of a computer are provided for the course. They take place in the computer rooms 4/15 and 4/34 of the building B5a. Graded interrogations will be organized during the practical sessions.

Mode of delivery (face-to-face ; distance-learning)

The course will be given face-to-face "ex cathedra" by a beamer presentation. The students that are registered for the course will be able to download the slides via myULg.

Recommended or required readings

Recommended literature: - T. Bastin: "Le Langage C/C++" (ULg, lecture notes) - H.-P. Garnir: "Introduction à l'Informatique" (ULg, lecture notes) -S. Lippmann, J. Lajoie & B.E. Moo: "C++ Primer" (Addison-Wesley, 2005) -B. Stroustrup: "The C++ Programming Language" (Addison-Wesley, 1997)

Assessment methods and criteria

Evaluation will be done by the interrogations that are organized during the practical sessions (10% of the total grade) as well as by an exam which takes place within one session of 4 hours (8h30-12h30 or 14h-18h; 90% of the total grade). The latter consists of realizing a few programs on the computer (practical part, 70%) and of responding to a few questions on the subject (theoretical part, 30%).

Work placement(s)

Organizational remarks

Contacts

Peter Schlagheck Département de Physique Université de Liège IPNAS, building B15, office 0/125 Sart Tilman 4000 Liège Phone: 04 366 9043 Email: Peter.Schlagheck@ulg.ac.be http://www.pqs.ulg.ac.be

Adaptation of teaching commitments following the COVID-19 pandemic for the May-June 2020 session

Teaching methods implemented : distance-learning

The ex cathedra course is replaced by podcasts that were realized by the professor. Those podcasts contain the slides of the lectures orally commented by the professor. The presentation slides of the practical sessions were replaced by podcasts that were realized by the assistants. Those podcasts are available on eCampus.
The programming exercises are provided on eCampus. The students are invited to write C/C++ programs to solve the exercises and to contact the assistants in case of problems. The participation at these exercises is optional in the sense that it does not count for the total grade associated with this course.
Fora were installed on eCampus in order to allow us to to reply to the questions posed by the students in a public manner.

Assessment subjects

The subjects to be evaluated cover the totality of the course (chapters 1 - 8) and the programming exercises.

Assessment methods

The evaluation of the course will be done by a written exam to be carried out on distance.This exam consists of realizing a few programs on the computer (practical part, 70%) and of responding to a few questions on the subject (theoretical part, 30%). The students will have 4 hours for this exam. The technical modalities of this exam will be communicated by mail to the students.

Contacts

Professor : Peter Schlagheck : Peter.Schlagheck@uliege.be
Assistants : Renaud Chrétien : rchretien@uliege.be Guillaume Vanhaele : guillaume.vanhaele@uliege.be

Adaptation of teaching commitments following the COVID-19 pandemic for the Aug-Sept 2020 session

Assessment subjects

The subjects to be evaluated cover the totality of the course (chapters 1 - 8) and the programming exercises.

Assessment methods

The evaluation of the course will be done by a written exam to be carried out on distance.This exam consists of realizing a few programs on the computer (practical part, 70%) and of responding to a few questions on the subject (theoretical part, 30%). The students will have 4 hours for this exam. The technical modalities of this exam will be communicated by mail to the students.

Contacts

Professor : Peter Schlagheck : Peter.Schlagheck@uliege.be
Assistants : Renaud Chrétien : rchretien@uliege.be Guillaume Vanhaele : guillaume.vanhaele@uliege.be

Items online

Chapter 1
Electronic logic

Chapter 2
Binarized information

Chapter 3
The working principle of a computer

Chapter 4
Elementary programming in C/C++

Chapter 5
Algorithmic tools

Chapter 6
Functions

Chapter 7
File handling and compilation

Chapter 8
Arrays

Code::Blocks
Introduction to the Code::Blocks software

C/C++ lecture notes
Lecture notes on the C/C++ programming language by Prof. Thierry Bastin

Podcast Chapter 1
This podcast can only be used by the students of the University of Liege in the framework of their studies.
No other usage or forwarding or sharing or transmission is authorized by the law.

TP physics: session 1
variables, instructions, elementary operations, input/output

TP physics: session 1 - printable version
variables, instructions, elementary operations, input/output

TP physics: session 2
branchings, loops, mathematical functions

TP physics: session 2 - printable version
branchings, loops, mathematical functions

TP physics: session 3
arrays, random numbers, errors and debugging

TP physics: session 4
functions and procedures, reading and writing into files

TP physics: session 6
strings

TP physics: session 7
pointers, dynamical arrays

TP physics: introductory session
Practical work: introductory session

TP physics: introductory session - printable version
Practical work: introductory session