# filename:python3.4.py
# author:super
# date:2018-03-04
# try except 的时候 要把具体的except 内容打印出来
# 如果不想做任何处理 可以在except 后面加上pass 就直接跳过
try:
5/0
except ZeroDivisionError:
print("you can not /0")
print("put 'q' is quit")
print("please input two number:")
while True:
firstnumber = input("
please input the firstnumber:")
if firstnumber == 'q':
break
secondnumber = input("please input the second number:")
if secondnumber == 'q':
break
try:
result = int(firstnumber) / int(secondnumber)
print(result)
except ZeroDivisionError:
pass
# print("the secondnumber could not be 0")