diff --git a/Fonctions/phenomene_numerique.py b/Fonctions/phenomene_numerique.py new file mode 100644 index 0000000..576f14c --- /dev/null +++ b/Fonctions/phenomene_numerique.py @@ -0,0 +1,11 @@ +def terme(valTerme: int): + if valTerme % 2 == 0: + return valTerme // 2 + else: + return valTerme * 3 + 1 + +nbTerme = int(input()) +while nbTerme != 1: + nbTerme = terme(nbTerme) + print(nbTerme, end=" ") +print() \ No newline at end of file