IBM HACKERRANK CODING SOLUTIONS
الذهاب إلى القناة على Telegram
We provide help for all Exams... Anyone can contact me @AK_Coder for Exam clearance and interviews Trusted ✅
إظهار المزيدلم يتم تحديد البلدالفئة غير محددة
4 420
المشتركون
لا توجد بيانات24 ساعات
لا توجد بيانات7 أيام
لا توجد بيانات30 أيام
أرشيف المشاركات
class Student:
def init(self,v1,v2,v3,v4):
self.v1 = v1
self.v2 = v2
self.v3 = v3
self.v4 = v4
class Department:
definit(self,dName,studentList):
self.dName = dName
self.studentList = studentList
def findMaximumStudentByPercentage(self):
if len(self.studentList) == 0:
return None
ans = sorted(self.studentList, key = lambda c : c.v3)
return ans[-1]
def sortStudentByYear(self):
if len(self.studentList) == 0:
return None
return sorted(self.studentList, key = lambda c : c.v2)
studentList = []
n = int(input())
for _ in range(n):
v1 = int(input())
v2 = int(input())
v3 = int(input())
v4 = input()
studentList.append(Student(v1,v2,v3,v4))
e = Department("XYZ",studentList)
a = e.findMaximumStudentByPercentage()
if a == None:
print("No Data Found")
else:
print(a.v1,a.v2,a.v3,a.v4,sep="\n")
b = e.sortStudentByYear()
if b == None:
print("No Data Found")
else:
for x in b:
print(x.v2)
Please help anyone, I have applied all correct but still it's not logging in.. Please help
