#write a program that inputs 10 integers, stores data in one-dimensional list #program finds sum (DON"T USE BUILT-IN FUNCTION) and average of the list elements. #This solution is using index to enter list elements def main(): my_list=[0]*10 #my_list is one-dimensional list #all elements are zero at this point #input for i in range(10): my_list[i]=int(input("enter int ")) #output #print list on one line print(my_list) #if we want to print list elements on different lines we have to use loop print("printing list elements on different lines") for i in range(10): print(my_list[i]) #calculating sum of list elements total=0 for i in range(10): total=total+my_list[i] print("sum of the list elements", total) #we can also use built-in function sum print("sum of the list elements using function sum", sum(my_list)) #average print("average", total/len(my_list)) main()