#Write a program that randomly generates the list of 10 integers. #Each integer in range -10 to 10. The program creates two new #lists: one list will store all positive ints from original list, and #second list will store all negative ints from original list. The #program finds the sum of all positives and their average and the #sum of all negatives and their average. import random def main(): my_list=[0]*10 for i in range(10): my_list[i]=random.randint(-10,10) print("randomly generated list is") print(my_list) pos=[] neg=[] for i in range(10): if(my_list[i]>0): pos.append(my_list[i]) elif(my_list[i]<0): neg.append(my_list[i]) print("positives are") print(pos) print("negatives are") print(neg) size_pos=len(pos) size_neg=len(neg) if(size_pos>0): sum_pos=sum(pos) print(sum_pos, sum_pos/size_pos) else: print("no positives") if(size_neg>0): sum_neg=sum(neg) print(sum_neg, sum_neg/size_neg) else: print("no negatives") main()