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!
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 trial
Tichaona KUNDODYIWA5,124 Points
where am i missing it
i am getting a typeError
class YatzyScoresheet: def score_ones(self, hand): return sum(hand.ones) def _score_set(self, hand, set_size): scores =  for worth, count in hand._sets.items(): if count == set_size: scores.append(worth*set_size) return max(scores) def score_one_pair(self, hand): return self._score_set(hand, 2) def score_chance(self, hand, set_size): score for worth, count in hand._set.items(): if count == set_size: scores.append(worth*set_size) return max(scores)
I don't have a ton of Python experience, but the
typeError you're getting appears to be caused by how many arguments you're passing to your
score_chance function. I don't think you need the
set_size argument for that function, it's being set elsewhere by the provided