I am a newbie who just learnt about functions and classes. I created a code using Class with a while loop that allows the entry of marks of five students in four subjects. Now I don't know how to add up the avg scores of all students and find the overall average score of the five students combined. I am providing the full code here. Please suggest all the improvements and solution to the problem.
entry = 1
while entry <=5:
class Marks():
def __init__(self, name, english_marks, hindi_marks, science_marks, economics_marks):
self.name = name
self.english_marks = english_marks
self.hindi_marks = hindi_marks
self.science_marks = science_marks
self.economics_marks = economics_marks
def output(self):
print("\n")
print("Hi "+self.name.title())
avg_marks = (self.english_marks + self.hindi_marks + self.science_marks + self.economics_marks)/4
print("Your average score is ", avg_marks)
print("\n")
name = input("Enter your name: ")
english_marks = int(input("Enter your English score: "))
hindi_marks = int(input("Enter your Hindi score: "))
science_marks = int(input("Enter your science score: "))
economics_marks = int(input("Enter your economics score: "))
j = Marks(name, english_marks, hindi_marks, science_marks, economics_marks)
j.output()
entry = entry + 1