Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python Fibonacci series up to n

def fib(n):
    a, b = 0, 1
    while a < n:
        print(a, end=' ')
        a, b = b, a+b
    print()


fib(1000)
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #python #Fibonacci #series
ADD COMMENT
Topic
Name
9+1 =