Skip to content

Instantly share code, notes, and snippets.

@filiptronicek
Created October 8, 2021 07:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filiptronicek/46f4d906cb24ca61eaaf52735d9735f9 to your computer and use it in GitHub Desktop.
Save filiptronicek/46f4d906cb24ca61eaaf52735d9735f9 to your computer and use it in GitHub Desktop.
πŸ’€πŸ€ŒπŸ”₯
ns = []
def compt(n):
ns.append(n)
if n == 1:
return
if n % 2 == 0:
n = n/2
else:
n = (3*n)+1
compt(n)
compt(10)
print(ns)
print(max(ns))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment