可能重复:
终止Python脚本
是否可以使用命令停止在任何行执行python脚本?
喜欢
some code
quit() # quit at this point
some more code (that's not executed)
Run Code Online (Sandbox Code Playgroud) 这就是问题:在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)
但是当我运行系统时,我一直遇到外部函数错误我做错了什么?谢谢!