2019-04-18
阅读量:
484
python报错信息
python主要有两种错误:
- 语法错误:也称为解析错误,最基本的。当Python解析器无法理解一行代码时出现。
- 例外:执行期间检测到的错误。例如 - ZeroDivisionError。
例子:
# Python code to illustrate
# working of try()
def divide(x, y):
try:
# Floor Division : Gives only Fractional Part as Answer
result = x // y
print("Yeah ! Your answer is :", result)






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
3条评论