Skip to content

Instantly share code, notes, and snippets.

@moloch--
Last active August 15, 2019 12:21
Show Gist options
  • Save moloch--/008c393fae8540572a3194ea04ab642d to your computer and use it in GitHub Desktop.
Save moloch--/008c393fae8540572a3194ea04ab642d to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
value = 0
while value < 1: value = int(input('Start: '))
while value != 1:
print(value)
if value & 1:
value = (3 * value) + 1
else:
value = value // 2
print(value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment