vault backup: 2023-11-24 14:40:35

This commit is contained in:
Louis Gallet 2023-11-24 14:40:35 +01:00
parent 7f17275555
commit 39fe17ca01
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY

View File

@ -88,13 +88,14 @@ def fibo(n):
prev = 1
cur = 1
i = 1
while n > 1:
while i < n:
prev += cur
cur += prev
i += 2
if
if i == n: # i % 2 == 1
return cur
else return prev
else:
return prev
```
## Exercise 1.5