# 递归函数 计算 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
Powered by: 博客园 Copyright © 2024 蓝绝 Powered by .NET 9.0 on Kubernetes