Verzeichnis für teil28

This commit is contained in:
Olli Graf
2024-10-25 14:03:27 +02:00
parent af36c44e66
commit fec0969d7f
12 changed files with 2 additions and 0 deletions

16
teil28/fib.py Normal file
View File

@@ -0,0 +1,16 @@
#Datei: fib.py
import functools
import sys
from counter import counter
#@functools.cache
@counter
def fib(n):
if n in [0,1]:
return n
else:
return fib(n-1) + fib(n-2)