diff options
Diffstat (limited to 'test/3-4.py')
-rw-r--r-- | test/3-4.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/3-4.py b/test/3-4.py new file mode 100644 index 0000000..79bf77a --- /dev/null +++ b/test/3-4.py @@ -0,0 +1,8 @@ + +def fibonacciIT(n,a,b): + if ((n == 0) or (n == 1)): + return a + else: + return (fibonacciIT(n-1, a+b, a)) + +print(fibonacciIT(6,1,1)) |