lab3

screenshots

:

sources:

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

 

Leave a Reply

Your email address will not be published. Required fields are marked *