Lab 3

This Is Lab 3

a= raw_input(‘please enter number’)
n= int(a)

while n != 1:

print n,

if n%2 == 0:

n = n/2

else:

n = n*3+1
print n