I'm trying to learn more about objects, and from what I understood, self doesn't take any value. Why does this method asks for another argument when I try to call it? Thanks.
class School:
def __init__(self):
self.roster = []
self.dicti = {1:[],
2:[],
3:[],
4:[],
5:[]}
def add_student(self,name,grade):
if name in self.dicti[grade]:
raise ValueError("The student is already added to the grade")
else:
self.dicti[grade].append(name)
x = School
print(x.add_student("radu",2))