Skip to content
This repository has been archived by the owner on Sep 27, 2020. It is now read-only.

Adding Fibonacci to python folder #322

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Python/Fibonacci.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
first = -1
second = -1
quantityOfNumbersToFind = int(input("Enter a quatity of numbers to calc: "))

for i in range(1,quantityOfNumbersToFind,1):

if second == -1 :
print(1)
if first>0:
second = 1
else:
first = 1

continue
else:
sum = second + first
print(sum)
second = first
first = sum