小编use*_*078的帖子

在Python中返回外部函数错误

这就是问题:在Python中给出以下程序,假设用户从键盘输入数字4.返回的价值是多少?

N = int(input("enter a positive integer:"))
counter = 1
while (N > 0):
    counter = counter * N
    N = N - 1
    return counter
Run Code Online (Sandbox Code Playgroud)

但是当我运行系统时,我一直遇到外部函数错误我做错了什么?谢谢!

python function

2
推荐指数
3
解决办法
8万
查看次数

标签 统计

function ×1

python ×1