距離計算できないの?(TypeError: /: 'int' および '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)