Skip to content

CloudberryPiTechnology/Fibonacci-Print

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Fibonacci Printer

Logic

The code uses simple logic which is setting variable a to 0 and variable b to 1, then when the input of fibonacci numbers wanted is entered it prints variable a and moves forward by making variable a to the value of b and variable b to the value of a + b.

The code for the following logic is given below.

n = int(input("How many Fibonacci numbers? "))
a, b = 0, 1

for _ in range(n):
    print(a)
    a, b = b, a + b

Instructions for use

To use the fibonacci series printer, start the code and enter the number of fibonacci series you want for the output. Then press enter and let the program process the calculation. Finally you would get the output as the result.

Thank you for using Fibonacci Printer

About

Print fibonacci series till your desired number.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages