【发布时间】:2018-04-15 02:00:00
【问题描述】:
为什么我会在除了 TypeError 之外得到一个无效的语法,我该如何解决?
Try:
score=float(raw_input("What is your score?"))
If score>100 or score<0:
print "please enter a score between 100 and 0"
except TypeError:
print "Please enter your score in digits"
【问题讨论】:
标签: python python-2.7 try-except