Skip to content

Commit

Permalink
Update ex_DP_D3_02_FIB
Browse files Browse the repository at this point in the history
  • Loading branch information
Trochim86 authored May 18, 2020
1 parent 5185c3e commit 6a19b05
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ex_DP_D3_02_FIB
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,13 @@ def fib(n):

for n in range(1, 10): # testing
print(n, "->", fib(n))


----------------------------------\
# rekurencja
def factorialFun(n):
if n < 0:
return None
if n < 2:
return 1
return n * factorialFun(n - 1)

0 comments on commit 6a19b05

Please sign in to comment.