SHARE
TWEET

Python Fibonacci Serise

naeem043 Oct 10th, 2018 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. n = int(input('Enter the number: '))
  2. n1 = 0
  3. n2 = 1
  4. count = 0
  5. print("The "+str(n)+"th fibonacci serise:")
  6. while count < n:
  7.     print(n1,end=' , ')
  8.     nth = n1 + n2
  9.     n1 = n2
  10.     n2 = nth
  11.     count += 1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top