无法计算距离?(TypeError: unsupported operand type(s) for /: 'int' and 'str') 建议让 python 识别哪个名称与哪个数字对应?这样我就可以让它打印正确的名字和获胜时间?(字符串?)
def main():
print "~*~*~*~*~*~ Timbuktu Archery Contest ~*~*~*~*~*~"
archerList = [] #list
timeList = [] #list2
distanceList = [] #list3
name = raw_input ("Enter contestants first name: ")
s = str(name)
archerList.append(name)
while name:
time = raw_input ("Enter time (in milliseconds) for %s: " % s)
timeList.append(time)
name = raw_input ("Enter contestants first name: ")
s = str(name)
archerList.append(name)
else:
print "Slowest archer was " , min(timeList)
print "Fastest archer was " , max(timeList)
for time in timeList:
distance = ((230/time)*681.1)
distanceList.append(distance)