#NESTED LOOPS - loop inside the loop #write a program that reads number of students in the major and for #each student program reads number of courses student takes in Fall #19. The program reads the grade for each course and finds #the average grade for each student in Fall 19 #Assume that number of students is positive and we will assume #that each student takes at least one course #We also want to find an average grade per major in Fall 19 num=int(input("enter number of students ")) total_courses=0 total_grades=0 for i in range(num): print("processing student",i+1) total=0 courses=int(input("enter number of courses ")) for j in range(courses): grade=int(input("enter grade ")) total=total+grade total_grades=total_grades+total total_courses=total_courses+courses print("student",i+1,"got average",total/courses) print("all students took", total_courses) print("average grade per student in the major", total_grades/total_courses)