Created
January 31, 2022 00:07
-
-
Save dabeaz/6d79b6af7392921e58f78b544e03b1ae to your computer and use it in GitHub Desktop.
Fibonacci, with flair.
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
# fibonacci.py | |
def πππ―πΌπ§βπ°πβ (n: πππ΅) -> β±ππ±: | |
if π <= 2: | |
return 1 | |
else: | |
return πβ±π«π°πα΅πcπ(βΏ-1) + ο½ππππ·ππ ππͺ(π-2) | |
for n in ππ’ο½π β―(1, 10): | |
ππο½ππ(ππ¦ο½πΈnβcπα΅’(n)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment