summaryrefslogtreecommitdiff
path: root/test/2g-fibonacci.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/2g-fibonacci.py')
-rw-r--r--test/2g-fibonacci.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/2g-fibonacci.py b/test/2g-fibonacci.py
new file mode 100644
index 0000000..fb1ac9f
--- /dev/null
+++ b/test/2g-fibonacci.py
@@ -0,0 +1,13 @@
+n = 9
+
+a = 0
+b = 1
+c = 0
+i = 0
+while i < n - 2:
+ c = a + b
+ a = b
+ b = c
+ i = i + 1
+
+print(c)