Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
πŸ’€πŸ€ŒπŸ”₯
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