Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input("Enter the value of n : "))
- f, s = 1, 1
- T1 = (f, s)
- for i in range(n-1):
- t = f + s
- T1 += (t,)
- f, s = s, t
- print(f"{n}th term in the fibonacci series is : {T1[n-1]}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement