我遇到了一个问题,我的代码跳过for
所有输入提示的循环,并直接打印循环下方的列表。
出了什么问题,我该如何解决?
import statistics
Age = list()
SaturnRT = list()
MarsRT = list()
Mars = list()
Saturn = list()
Houses = ['saturn', 'Saturn', 'Mars', 'mars']
CheckList = ['Saturn', 'saturn']
ReactionTime = list()
inputVar = None
for i in range(0, ):
print("enter age: ")
while inputVar != type(int):
try:
inputVar = int(input())
while inputVar>16 or inputVar<12:
print("error! invalid entry")
inputVar = int(input("enter the age: "))
break
except:
print("enter an integer! ")
Age.append(inputVar)
print("enter reaction time (ms): ")
while inputVar …
Run Code Online (Sandbox Code Playgroud)