Get Mystery Box with random crypto!

class Student: def init(self, studentid, year, Percentage, | Codeforces solution

class Student:
def init(self, studentid, year, Percentage, Name):
self.studentid = studentid
self.year = year in
self.Percentage = Percentage
self.Name = Name


class Deparment:
def init(self, dName, sList):
self.dName = dName
self.sList = sList

def findMinimumStudentByPercentage(self):
min_obj = min(self.sList, key=lambda x:x.Percentage)
return min_obj

def sortStudentByPercentage(self):
sorted_objects = sorted(self.sList, key=lambda x:x.Percentage)
sorted_Percentage = []
for i in sorted_objects:
sorted_Percentage.append(i.Percentage)
return sorted_Percentage
sList = []
n = int(input())
for i in range(n):
studentid=input()
year=int(input())
Percentage=int(input())
Name=input()
s = Student(studentid, year, Percentage, Name)
sList.append(s)
d = Deparment("H1", sList)
op1 = d.findMinimumStudentByPercentage()
if op1 != None:
print(op1.studentid)
print(op1.year)
print(op1.Percentage)
print(op1.Name)
else:
print('No Data Found')

op2 = d.sortStudentByPercentage()
for i in op2:
print(i)


Python

t.me/getcode1