Commit 08dd3e75 by BellCodeEditor

save project

parent 4cb917e3
Showing with 11 additions and 3 deletions
def peach(n):
'''def peach(n):
if n==10:
return 1
num=(peach(n+1)+1)*2
return num
peach_num=peach(2)
print(peach_num)
\ No newline at end of file
print(peach_num)'''
def func(num):
if num==1:
return 1
n=num+func(num-1)
return n
func_num=func(4)
print(func_num)
\ 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