# 递归函数 计算 6!= 6*5*4*3*2*1
def fun(n): if n==1: return n else: res=n*fun(n-1) #递归行数 return res print(fun(6))
E:\PycharmProjects\pythonProject\venv\Scripts\python.exe E:/PycharmProjects/pythonProject/demon1/demo32.py 720 进程已结束,退出代码0
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3