Advertisement
facedwarrior193

Fibonacci series Generator

Mar 25th, 2022
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. b = int(input("Enter the number you want to check"))
  2. def Generator(a):
  3.     while a != 1:
  4.         if (a%2) == 0:
  5.             a = a/2
  6.         else:
  7.             a = (a*3) + 1
  8.         a = int(a)
  9.         print(a)
  10. Generator(b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement