为什么pycharm运行程序后不提示processon finished with exit code

如题所述

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
温馨提示:答案为网友推荐,仅供参考
相似回答