Skip to content

Instantly share code, notes, and snippets.

@bschne
Created October 8, 2019 16:20
Show Gist options
  • Select an option

  • Save bschne/186ebae4915882a5f08dbac3023e9268 to your computer and use it in GitHub Desktop.

Select an option

Save bschne/186ebae4915882a5f08dbac3023e9268 to your computer and use it in GitHub Desktop.
HS2019-Inf1-Lec4 Exercise 2
#!/usr/bin/python3
def fibonacci(n):
if n <= 1:
return 1
return fibonacci(n-1) + fibonacci(n-2)
print([fibonacci(i) for i in range(20)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment