Created
May 18, 2020 09:58
-
-
Save laowantong/30bb2213e82839e095efa2553f7a91f5 to your computer and use it in GitHub Desktop.
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
%%paroxython | |
def fibonacci(n): | |
result = [] | |
(a, b) = (0, 1) | |
while a < n: | |
result.append(a) | |
(a, b) = (b, a + b) | |
return result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment