Fibonacci series in Python - Learning Python (6th Night)

 Just run this code in any IDE, and see the output:

def fib(n):
a = 0
b = 1
print(a)
print(b)
for i in range(1,n):
c=a+b
print(a+b)
a = b
b = c

fib(10)

Comments

Popular posts from this blog

Husband's Affair with Step Daughter Ends in Grisly Murder (True Crime Documentary)