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 trialStephen Hutchinson
8,426 PointsBummer! Didn't get a correct value for `Hand.total`?
I tried this code locally and it worked well:
from dice import D20
class Hand(list):
@property
def total(self):
return sum(self)
@classmethod
def roll(cls, amount):
dice = cls()
for _ in range(amount):
dice.append(D20())
return dice
Any ideas why I get that error?
Chris Howell
Python Web Development Techdegree Graduate 49,702 PointsChris Howell
Python Web Development Techdegree Graduate 49,702 PointsYou will have to post your dice.py as well too if you are still getting an error.
I used your hands.py code from above and passed this challenge. The only thing I added on my own was the class D20 that extends Die.