?
# 遞歸函數(shù)? ? 計(jì)算? 6!= 6*5*4*3*2*1
def fun(n): if n==1: return n else: res=n*fun(n-1) #遞歸行數(shù) return res print(fun(6))
E:PycharmProjectspythonProjectvenvScriptspython.exe E:/PycharmProjects/pythonProject/demon1/demo32.py 720 進(jìn)程已結(jié)束,退出代碼0
?
本文摘自 :https://www.cnblogs.com/