Commit 730d89ee by BellCodeEditor

auto save

parent 1f46c2dc
Showing with 11 additions and 0 deletions
def sum_numbers(num):
# 递归的出口
if num == 1:
return 1
# 数字的累加
temp = sum_numbers(num - 1)
return num +temp
result = sum_numbers(10)
print(result)
\ 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