相关疑难解决方法(0)

以编程方式停止执行python脚本?

可能重复:
终止Python脚本

是否可以使用命令停止在任何行执行python脚本?

喜欢

some code

quit() # quit at this point

some more code (that's not executed)
Run Code Online (Sandbox Code Playgroud)

python

199
推荐指数
4
解决办法
49万
查看次数

在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万
查看次数

标签 统计

python ×2

function ×1