summaryrefslogtreecommitdiff
path: root/comp/lucas-standen-NEA/writeup2/examples/fib.py
diff options
context:
space:
mode:
authorthing 1 <thing1@seacrossedlovers.xyz>2024-12-05 12:04:08 +0000
committerthing 1 <thing1@seacrossedlovers.xyz>2024-12-05 12:04:08 +0000
commit68baa2efd72cb150dd6138d7b208b2621bcfc431 (patch)
treefefde42e9df77384f9fa11adfa3efd3af73869d8 /comp/lucas-standen-NEA/writeup2/examples/fib.py
parent27e2e13679f57eb2bd139175216b1d5989e8dc6a (diff)
made a load of stuff
Diffstat (limited to 'comp/lucas-standen-NEA/writeup2/examples/fib.py')
-rw-r--r--comp/lucas-standen-NEA/writeup2/examples/fib.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/comp/lucas-standen-NEA/writeup2/examples/fib.py b/comp/lucas-standen-NEA/writeup2/examples/fib.py
new file mode 100644
index 0000000..f6823af
--- /dev/null
+++ b/comp/lucas-standen-NEA/writeup2/examples/fib.py
@@ -0,0 +1,8 @@
+def fib(n):
+ if (n < 2):
+ return n
+
+ return fib(n-1) + fib(n-2)
+
+val = 30
+print(fib(val))