Skip to content

Instantly share code, notes, and snippets.

@kstampo
kstampo / Ch3-Collatz.py
Last active October 22, 2017 18:58
Automate the boring stuff with Python
def collatz(number):
if number%2==0:
#print (number//2)
return number//2
else:
#print (3*number+1)
return 3*number+1
try:
print ("Enter a number", end=" ")