Commit 08dd3e75 by BellCodeEditor

save project

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