Source: https://mathsaucap.pagesperso-orange.fr/mathsaucap/3eme/ALGORITHMIQUE/de_Scratch_a_Python_ex.pdf