def print_hi(name):
print(f'Hi, {name}')
if __name__ == '__main__':
print_hi('PyCharm')
class student:
def __init__(self, grade1, grade2):
self.grade1 = grade1
self.grade2 = grade2
def __pow__(self, power, modulo=None):
return pow(self.grade1, power)
def __lt__(self):
if self.grade1 > self.grade2:
return str(self.grade1)+">"+str(self.grade2)
elif self.grade1 < self.grade2:
return str(self.grade1)+"<"+str(self.grade2)
else:
return "equal"
student1 = student(80, 85)
print(pow(student1, 2))
print(student1.__lt__())