else statement not working. how to close loop when nothing is entered? suggestions on how to approach?
def main():
print "~*~*~*~*~*~ Timbuktu Archery Contest ~*~*~*~*~*~"
archerList = [] #list
timeList = [] #list2
name = raw_input ("Enter contestants first name: ")
s = str(name)
archerList.append(name)
while name > 0:
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:
name == ""
print "Slowest archer was " , min(timeList)
print "Fastest archer was " , max(timeList)
raw_inputtakes the input as string, what do you get by doing> 0with it? If you want a number from theraw_input, better cast it toint...nameto something that really signifies holding a nnumeric vcalue.