Answer the question
In order to leave comments, you need to log in
Why does the method not see the arguments?
The task was given: to create a class, a method to it and a class object, set its attributes and call the method. But the error "Student() takes no arguments" comes out.
I don't really understand why, everything works in the lecture :/
class Student():
def __init__(self,name, group,spec):
self.name = name
self.group = group
self.spec = spec
class Student:
def study(self):
print ('your name', self.name)
pass
Mvgr = Student('kolya',61,'bank')
Mvgr.study()
print(Mvgr.study())
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question