#one dimensional lists #write a program (main only) #that creates a list of 5 grades #and finds average grade #we will not use build-in function sum, but instead we will write #a code to find sum of grades def main(): grades=[] #defines empty list for i in range(5): num=int(input("enter grade ")) grades.append(num) print("grades are", grades) #if we want to print grades on separate lines #we need to use loop print("printing grades on separate lines") for i in range(5): print("student",i+1, "grade is", grades[i]) #to find an average grade, first we need to find #sum of all grades total=0 for i in range(5): total=total+grades[i] print("total grade is", total) print("using build-in function sum, total grade is", sum(grades)) print("average grade", total/5) main()