try:
total = sum(numlist)
length = len(numlist)
- except ValueError:
- print "The number list was not a list of numbers."
+ except TypeError:
+ raise TypeError("The number list was not a list of numbers.")
except:
print "There was a problem evaluating the number list."
return total/length
try:
total = sum(numlist)
length = len(numlist)
- except ValueError:
- print "The number list was not a list of numbers."
+ except TypeError:
+ raise TypeError("The number list was not a list of numbers.")
except:
print "There was a problem evaluating the number list."
return total/length
try:
total = sum(numlist)
length = len(numlist)
- except ValueError:
- print "The number list was not a list of numbers."
+ except TypeError:
+ raise TypeError("The number list was not a list of numbers.")
except:
print "There was a problem evaluating the number list."
return total/length
try:
total = sum(numlist)
length = len(numlist)
- except ValueError:
- print "The number list was not a list of numbers."
+ except TypeError:
+ raise TypeError("The number list was not a list of numbers.")
except:
print "There was a problem evaluating the number list."
return total/length