#!/usr/local/bin/python3
def func(x):
if x == 1:
return x
return x * func(x - 1)
num = 5
print('%s的阶乘是%s' % (num, func(num)))
2023-03-30 10:14:48 阅读次数:128
#!/usr/local/bin/python3
def func(x):
if x == 1:
return x
return x * func(x - 1)
num = 5
print('%s的阶乘是%s' % (num, func(num)))
上一篇:QCustomPlot开发笔记(二):QCustomPlot用户交互、元素项以及特殊用法
下一篇:C#写日志工具类(旧版)
为什么python-office自动化办公不支持mac和linux?
解决pandas读取文件报错ValueError: Invalid file path or buffer object type: <class ‘tuple‘>
loguru分离特定级别的日志到不同文件(TRACE/DEBUG/INFO/SUCCESS/WARNING/ERROR/CRITICAL)
python-函数-变量的作用域-全局变量
实验四、格子世界(Grid World)
Python——break、continue、pass语句作用
python语句如何换行和字符串太长如何换行
python3中,isinstance() 函数
python3中,//、/ 的区别
安装pyspark kernel
文章
21549
阅读量
2124565
2024-06-13 08:59:42
2024-06-13 08:18:27
2024-06-13 08:12:14
2024-06-13 08:12:14
2024-06-13 08:07:37
2024-06-12 09:30:16
2023-03-16 07:49:58
2023-05-11 06:07:12
2023-04-25 10:20:57
2023-06-07 07:31:52
2023-04-13 09:31:09
2023-03-07 06:59:32