@@ -0,0 +1,1397 @@
+# Enter your code here. Read input from STDIN. Print output to STDOUT%0An = input()%0Aarr = %5Bint(i) for i in raw_input().strip().split()%5D%0A%0Amean = float (sum(arr)) / n%0Aprint mean%0A%0Adef calc_median(input_list):%0A    sorted_list = sorted(input_list)%0A    l = len(sorted_list)%0A    if(l%252 == 0):%0A        med = float (sorted_list%5Bl/2%5D + sorted_list%5B(l/2)-1%5D)/2%0A        return med%0A    else:%0A        med = sorted_list%5Bl/2%5D%0A        return med%0A    %0Amedian = calc_median(arr)%0Aprint median%0A%0Adef mode(inp_list):%0A    sort_list = sorted(inp_list)%0A    dict1 = %7B%7D%0A    for i in sort_list:        %0A            count = sort_list.count(i)%0A            if i not in dict1.keys():%0A                dict1%5Bi%5D = count%0A                %0A    maximum = 0 #no. of occurences%0A    max_key = -1 #element having the most occurences%0A    %0A    for key in dict1:%0A        if(dict1%5Bkey%5D%3Emaximum):%0A            maximum = dict1%5Bkey%5D%0A            max_key = key %0A        elif(dict1%5Bkey%5D==maximum):%0A            if(key%3Cmax_key):%0A                maximum = dict1%5Bkey%5D%0A                max_key = key%0A             %0A    return max_key%0A%0Aprint mode(arr)%0A%0Adef std_deviation(arr,mean):%0A    %0A    sum_sqr_distances = 0%0A    float(sum_sqr_distances)%0A    %0A    for i in arr:%0A        sum_sqr_distances += (i-mean)**2%0A        %0A    std_dev = 0.0%0A    float(std_dev)%0A    std_dev = (sum_sqr_distances/n)**0.5%0A    %0A    return round(std_dev,1)%0A%0Aprint std_deviation(arr,mean)%0A    %0A

Create stats_problem.py