Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def syracuse(N):
- u=N
- i=0
- while (i < 20):
- print(u)
- if (u%2==0):
- u=u/2
- else :
- u=(u*3)+1
- i=i+1
- def tempsdevol(N):
- u=N
- i=0
- while (u!=1):
- if (u%2==0):
- u=u/2
- else :
- u=(u*3)+1
- i=i+1
- print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement