aboutsummaryrefslogtreecommitdiff
path: root/entries
diff options
context:
space:
mode:
authorgonzalezf2022-10-25 03:20:01 +0000
committergonzalezf2022-10-25 03:20:01 +0000
commitf3f3251828e61af45888fb2b5316eaa534aa9b67 (patch)
tree9d3c43d18944ba419dceb0b90ecbab710b7c94dc /entries
parentf8350ce16a8b195f5b886299f0a10e2ade39d327 (diff)
people.json fixed
Diffstat (limited to 'entries')
-rw-r--r--entries/gonzalezf/fib.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/entries/gonzalezf/fib.py b/entries/gonzalezf/fib.py
new file mode 100644
index 0000000..26d3a64
--- /dev/null
+++ b/entries/gonzalezf/fib.py
@@ -0,0 +1,14 @@
+
+def fibonacci(n):
+ if n == 1 or n == 0:
+ return 1
+ else:
+ return fibonacci(n-1) + fibonacci(n-2)
+
+
+def main():
+ n = int(input('Insert n: '))
+ print('Fibonacci (',n,') =', fibonacci(n))
+
+if __name__ == "__main__":
+ main() \ No newline at end of file