Created
October 8, 2019 16:20
-
-
Save bschne/186ebae4915882a5f08dbac3023e9268 to your computer and use it in GitHub Desktop.
HS2019-Inf1-Lec4 Exercise 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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