code create for cours SINF1252 at Ecole Polytechnique Louvain-la-Neuve, Belgium