Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialHope Mallary
900 Pointsdon't get it
help
class Game:
def __init__(self):
self.current_score = [0, 1]
def score(self, player):
self.current_score +1
1 Answer
Andreas cormack
Python Web Development Techdegree Graduate 33,011 PointsHi Hope
Firstly check your indentation.
class Game:
def __init__(self): #__init__ runs when the class gets initialized for example mygame = Game()
self.current_score = [0, 1] # this setts the attribute current_score to a default of [0,1]
def score(self, player): # check your indentation. when this method is called the current_score is incremented by 1
self.current_score +1
hope this helps. For future, give a more detailed explanation of what you want help with.