Skip to content

Instantly share code, notes, and snippets.

@mtraynham
Last active May 26, 2023 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtraynham/4bd68d740b72bfc2873c5ec5316ce227 to your computer and use it in GitHub Desktop.
Save mtraynham/4bd68d740b72bfc2873c5ec5316ce227 to your computer and use it in GitHub Desktop.
fib.py
def fibonacci(n):
if n <= 1:
return n
else:
return fibonacci(n-1) + fibonacci(n - 2)
def main():
num_Terms = 1000
fibSequence = []
for i in range(num_terms):
fibSequence.append(fibonacci(i))
print(fib_sequence)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment