我正在尝试解决这段代码中的错误:
import time
while1 = True
def grader (z):
if z >= 0 or z <= 59:
return "F"
elif z >= 60 or z <= 62:
return "D-"
elif z >= 62 or z <= 66:
return "D"
elif z >= 67 or z <= 69:
return "D+"
elif z >= 70 or z <= 62:
return "C-"
elif z >= 73 or z <= 76:
return "C"
elif z >= 77 or z <= 79:
return "C+"
elif z >= 80 or z <= 82:
return "B-"
elif z >= 83 or z <= 86:
return "B"
elif z >= 87 or z <= 89:
return "B+"
elif z >= 90 or z <= 92:
return "A-"
else:
return "A"
while while1:
z = int(input("I will tell you the grade of this number, enter from 1 - 100\n"))
if z < 0 or z > 100:
print "Between 1 and 100 PLEASE!\n"
while1 = True
print grader(z)
print "New number now\n"
time.sleep(100)
while1 = True
这种情况下的参数是整数z
。z
' 的值由用户设置,然后该函数应该进入并确定什么字母等级z
值得,尽管它总是返回“F”。
这让我很困惑(我是新手),我可以使用一些帮助。