Source: http://www.prepamantes.fr/wp-content/uploads/2013/08/Bases_algo+python.pdf