trying to understand classes and methods in Python 3.7. I keep running the code below, but keep getting this NameError, associated with the points variable I established in the initialize method of the Stats class. I believe the error is the result of some problem recognizing local/global variables, but can't put my finger on it. Does anyone have any ideas?
class Stats:
def __init__(self, points, rebounds, assists, steals):
self.points = points
self.rebounds = rebounds
self.assists = assists
self.steals = steals
def tripDub(self):
if points >= 10 and rebounds >= 10 and assists >= 10 and steals >= 10:
return "Yes!"
else:
return "Nope!"
s = Stats(30, 20, 9, 5)
print("Did he earn a Triple Double? Result:", s.tripDub())