热门标签
更多>
搜索结果
查询Tags标签: jiecheng2,共有 2条记录-
python 实现阶乘计算的三种方式
def jiecheng(num,result):if num>1:result = num*resultnum-=1jiecheng(num,result)else:print(result=, result)# jiecheng(5, 1)def jiecheng2(num,result):for i in range(1,num+1):# print(i)result*=iprint(result=,result)# jiecheng2(5,1)from functools impor…
2022/1/9 20:04:40 人评论 次浏览 -
python 实现阶乘计算的三种方式
def jiecheng(num,result):if num>1:result = num*resultnum-=1jiecheng(num,result)else:print(result=, result)# jiecheng(5, 1)def jiecheng2(num,result):for i in range(1,num+1):# print(i)result*=iprint(result=,result)# jiecheng2(5,1)from functools impor…
2022/1/9 20:04:40 人评论 次浏览