'''weatherstats.py Skeleton file for homework assignment. ''' import sys print(sys.argv) # sys.argv is a list of command-line arguments. Get acquainted with it by # trying # $ python3 weatherstats.py msp-temperatures.txt # $ python3 weatherstats.py a b c # $ python3 weatherstats.py 'a b c' # $ python3 weatherstats.py # and think about how to process command-line arguments. def loadWeatherData(fileName): '''Loads temperature data from the specified file into a list of lists of integers, and returns the list. This function assumes that each line of the file consists of a year followed by some number of temperatures, all separated by commas. For example, if the file looks like this: 1939,-10,5,3,14,... 1940,2,8,-1,4,... ... 2014,7,12,3,5,-2,... (which means that on Jan 1, 1939, the high temperature was 10, etc.), then loadWeatherData will return a list of lists like this: [[1939,-10,5,3,14,...], [1940,2,...], ..., [2014,7,12,...]] ''' pass def mean(listOfNumbers): '''Returns the mean of the specified list of numbers if the list contains at least one element. Otherwise, returns 0. This function assumes that its parameter refers to a (possibly empty) list of numbers.''' pass def standardDeviation(listOfNumbers): '''Returns the standard deviation of the specified list of numbers if the list contains 2 or more elements. Otherwise, returns 0. This function assumes that its parameter refers to a (possibly empty) list of numbers.''' pass