Commit eb3c76e8 by BellCodeEditor

auto save

parent cdbac5fe
Showing with 15 additions and 0 deletions
def func(num):
if num == 1:
return 1
return num * func(num - 1)
print(func(5))
print(1*2*3*4*5)
\ No newline at end of file
def func(num):
if num == 1:
return 1
sum = func(num-1)
a = num + sum
return a
print(func(5))
\ 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