异常
摘要:
#异常一 :可以预知的异常 可以用if条件避免#游戏猜年纪:AGE = 25age = input('>>>')if age.isdecimal(): if int(age) > AGE: print('答对啦!')#异常二,不可以预知的异常,用try 和 except接收try: f = open('a.txt', 'r', encoding='utf-8') p... 阅读全文
posted @ 2019-01-27 21:00 别离 阅读(166) 评论(0) 推荐(0) 编辑