Added Fibonacci_Sequence_Generator and updated main README.md accordingly (#173)

This commit is contained in:
JohnWesleyK 2020-10-05 09:13:23 +01:00 committed by GitHub
parent 27f2a0e8b6
commit 881f70e6e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,23 @@
def Fibbo_Sequence_Generator():
# Generates a fibonacci sequence with the size of ngi
runFib = True
while(runFib):
n = int(input('How many numbers do you need? '))
if n > 0 :
runFib = False
series = [1]
while len(series) < n:
if len(series) == 1:
series.append(1)
else:
series.append(series[-1] + series[-2])
for i in range(len(series)): # Convert the numbers to strings
series[i] = str(series[i])
else:
print('enter a valid number')
return(', '.join(series)) # Return the sequence seperated by commas
print(Fibbo_Sequence_Generator())

View File

@ -0,0 +1,10 @@
# Python Fibonacci Sequence Generator
This python script will ask you how many numbers do you need to see in the Fibonacci Sequence and generates the sequence based on your input.
## Requirement
Python 3.xx
## Running the script
```bash
python Fibonacci.py
```

View File

@ -100,6 +100,7 @@ So far, the following projects have been integrated to this repo:
|[Excel Files Merger](Excel_Files_Merger) | [Andrei N](https://github.com/Andrei-Niculae)| |[Excel Files Merger](Excel_Files_Merger) | [Andrei N](https://github.com/Andrei-Niculae)|
|[Excel to List](Excel_to_ListofList) | [Nitish Srivastava](https://github.com/nitish-iiitd)| |[Excel to List](Excel_to_ListofList) | [Nitish Srivastava](https://github.com/nitish-iiitd)|
|[Extended_ip_address_info](extended_ip_address_info) | [hafpaf](https://github.com/hafpaf)| |[Extended_ip_address_info](extended_ip_address_info) | [hafpaf](https://github.com/hafpaf)|
|[Fibonacci_Sequence_Generator](Fibonacci_Sequence_Generator) | [John Wesley Kommala](https://github.com/JohnWesleyK)|
|[File explorer](File-Explorer-Dialog-Box) | [Nikhil Kumar Singh](https://github.com/nikhilkumarsingh)| |[File explorer](File-Explorer-Dialog-Box) | [Nikhil Kumar Singh](https://github.com/nikhilkumarsingh)|
|[File Sharing Bot](File-Sharing-Bot) | [Darshan Patel](https://github.com/DarshanPatel11)| |[File Sharing Bot](File-Sharing-Bot) | [Darshan Patel](https://github.com/DarshanPatel11)|
|[Flash card quizzer](Flash-card-Challenge) |[Utkarsh Sharma](https://github.com/Utkarsh1308) | |[Flash card quizzer](Flash-card-Challenge) |[Utkarsh Sharma](https://github.com/Utkarsh1308) |