Baheeg Training and Test Exam

Python intermediate Level

Score: 0 / 0 answered

Progress: 0 of 817 qs

time elap: 00:00

Question 1: What is the output of the following code?

from functools import total_ordering

@total_ordering
class Student:
    def __init__(self, grade):
        self.grade = grade
    def __eq__(self, other):
        return self.grade == other.grade
    def __lt__(self, other):
        return self.grade < other.grade

s1 = Student(85)
s2 = Student(90)
print(s1 <= s2)