Files

14 lines
185 B
Python
Raw Permalink Normal View History

2026-04-08 13:50:35 +02:00
c0 = int(input("Inserire un numero intero positivo: "))
passi=0
while c0 > 1:
if c0 % 2 == 0:
c0 /= 2
else:
c0 = c0*3+1
passi += 1
print("passi", passi)