Source: https://www.concours-centrale-supelec.fr/CentraleSupelec/MultiY/C2015/Python-random.pdf