class Grade:
def __init__(self, scores):
self.scores = scores
self.grades = []
def make_grades(self):
for s in self.scores:
if s >= 90:
self.grades.append('A')
elif s >= 80:
self.grades.append('B')
else:
self.grades.append('C')
def show(self):
print("점수:", self.scores)
print("등급:", self.grades)
scores = []
n = int(input())
for i in range(n):
score = int(input())
scores.append(score)
g = Grade(scores)
g.make_grades()
g.show()
To embed this project on your website, copy the following code and paste it into your website's HTML: