Commit caf045b8 by BellCodeEditor

save project

parent c355f448
Showing with 1397 additions and 0 deletions
......@@ -3,3 +3,1400 @@
#要求这个函数能计算1+2+3+……+num的结果
def sum_number(num):
if num==1
return 1
text=sum_number (num-1)
return text+num
result= sum_number(100):
print(result)
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