Ad

Write a class named Student which takes arguments:first_name, last_name, grade, avg_marks(average marks).
and can return: first_name, full_name, grade,and be able to assess perfomance by using avg_marks.
grading scheme:
0-25:B-
26-50:B+
51-75:A-
76-100:A+

class Student:
    def __init__(self, first_name, last_name, grade, avg_marks):
        self.first_name=first_name
        self.full_name=first_name+" "+last_name
        self.grade=grade
        self.avg_marks=avg_marks
    
    def assess(self):
        if 0<=self.avg_marks<=25:
            return "B-"
        if 26<=self.avg_marks<=50:
            return "B+"
        if 51<=self.avg_marks<=75:
            return "A-"
        if 76<=self.avg_marks<=100:
            return "A+"