def stGPA(student):
a = 0
for i in range(len(student)):
a = a + int(student[i])
return a / len(student)
print('How many students are in your group?')
nst = int(input())
print('How many classes You are taking?')
ncl = int(input())
students = []
for i in range(nst):
grades = []
for j in range(ncl):
print('Enter grades for student',i+1)
grades.append(input())
students.append(grades)
for i in range(nst):
print('student',i+1,'GPA =',stGPA(students[i]))
Comments
Leave a comment