为什么pycharm运行程序后不提示processon finished with exit code
1个回答
展开全部
1. python运行结束出现:
process finished with exit code 0
说明,程序正常运行完。
例如:test1.py文件如下代码
a = 1/1
print a
运行后出现:
1
Process finished with exit code 0
=============================
2. 如果出现:
process finished with exit code 1
说明程序出错,也就是代码有问题。
例如:test2.py
a = 1/0
print a
运行后出现:
Traceback (most recent call last):
File "/Users/pwd/work/project/AnyData/data/test3.py", line 36, in <module>
a = 1/0
ZeroDivisionError: integer division or modulo by zero [报错:0不能被除]
Process finished with exit code 1
process finished with exit code 0
说明,程序正常运行完。
例如:test1.py文件如下代码
a = 1/1
print a
运行后出现:
1
Process finished with exit code 0
=============================
2. 如果出现:
process finished with exit code 1
说明程序出错,也就是代码有问题。
例如:test2.py
a = 1/0
print a
运行后出现:
Traceback (most recent call last):
File "/Users/pwd/work/project/AnyData/data/test3.py", line 36, in <module>
a = 1/0
ZeroDivisionError: integer division or modulo by zero [报错:0不能被除]
Process finished with exit code 1
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询