Commit 60595fe9 by BellCodeEditor

save project

parent 6bed4ed9
Showing with 12 additions and 5 deletions
def sum_numbers(num):
if num == 1:
def func(n):
if n <= 2:
return 1
else:
a = func(n-1)+func(n-2)
return a
a = sum_numbers(num-1)+1*num
return a
print(sum_numbers(10))
print(func(15))
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment