摘要:【demo】Python递归 #!/usr/bin/python # coding=utf-8 import os #递归求 1+2+3+...+100 之和 s=0 def add(i,step,end_num): global s print("s=",s, "i=",i) s=s+i i=i+
阅读全文
posted @ 2020-03-13 22:42
绿Z
随笔分类 - Python
摘要:【demo】Python递归 #!/usr/bin/python # coding=utf-8 import os #递归求 1+2+3+...+100 之和 s=0 def add(i,step,end_num): global s print("s=",s, "i=",i) s=s+i i=i+
阅读全文
posted @ 2020-03-13 22:42
|