I tried writing a code for the collatz
func .But somehow i failed in it.i am just sharing the code which i tried.can you figure out the mistake
def my_input():
a=input("enter:")
collatz(a)
def myprint(y):
print(y)
if (y!=1):
my_input()
def collatz(number):
if (number%2)==0:
return myprint(number/2)
else:
return myprint(3*number+1)
my_input()