Skip to content

Instantly share code, notes, and snippets.

@HiddenMotives
Created December 16, 2017 04:40
Show Gist options
  • Save HiddenMotives/f3448fb3f27f470c3f4bab2670243db8 to your computer and use it in GitHub Desktop.
Save HiddenMotives/f3448fb3f27f470c3f4bab2670243db8 to your computer and use it in GitHub Desktop.
sequences = []
amount = int(input("How many sequences?: "))
if(amount == 1):
sequences = [1]
else:
if(amount >= 2):
sequences =[1,1]
while(amount > len(sequences)):
sequences.append(
sequences[len(sequences) -1] + sequences[len(sequences) -2]
);
for sequence in sequences:
print sequence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment