Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint, choice
- from names_generator import names
- class Abiturient:
- def __init__(self, ID: int) -> None:
- self.ID = ID
- self.name = choice(names)
- class Teacher:
- def __init__(self, allAbiturients: list ) -> None:
- #self.Abiturient = Abiturient
- self.allAbiturients = allAbiturients
- def testAbiturients(self):
- dictAbiturients = {}
- for element in self.allAbiturients:
- dictAbiturients[randint(0, 100)] = element
- return dictAbiturients
- class Faculty:
- def __init__(self, name: str, maxNumberOfStudents: int):
- self.name = name
- self.maxNumberOfStudents = maxNumberOfStudents
- def returnPassedAbiturients(self, dictAbiturients: dict) -> list:
- return sorted(dictAbiturients.keys(), reverse=True)[:self.maxNumberOfStudents:]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement