From 3106a55d8edfc9fe2e598d972e59000ae39cdd36 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Mon, 4 Sep 2023 20:43:25 +0200 Subject: [PATCH] fibbonaci --- src/fib.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/fib.py diff --git a/src/fib.py b/src/fib.py new file mode 100644 index 0000000..3c1fe74 --- /dev/null +++ b/src/fib.py @@ -0,0 +1,6 @@ +def fib(n): + fibs = [0, 1] + for i in range(2, n+1): + fibs.append(fibs[i-1] + fibs[i-2]) + print(fibs) + return fibs[n]