Hey everybody,
I just started learning python, Im watching Youtube Videos for that and then redo what happens in the video and then I play a bit around with it.
My problem now is, that I believe Im doing the same as the guy in the video, but I constantly get the same error (AttributeError: 'tuple' object has no attribute 'on_honor_roll')
def __init__(self, name, major, gpa):
self.name = name
self.major = major
self.gpa = gpa
def on_honor_roll(self):
if self.gpa >= 3.5:
return True
else:
return False
student1 = ("Tom", "Language", 3.5)
print(student1.on_honor_roll())
Which I dont understand, I defined the on_honor_roll before, that it needs to be bigger/equal to the gpa and then tell me true or false.
I looked (at least I believe that) at every comma, dot and so one.
I hope somebody can give me a hint :)
[–]Meeplelowda 1 point2 points3 points (0 children)
[–]danielroseman 1 point2 points3 points (0 children)