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 trial

Python Object-Oriented Python Dice Roller RPG Roller

Gilbert Craig
Gilbert Craig
2,102 Points

I'm going to use code similar to Hand.roll(2)

The challenge references 'Hand.roll(2)' which I have not identified in any video or previous challenge.

Can I be pointed to the location of this code ?

1 Answer

Steven Parker
Steven Parker
229,732 Points

Task 2 of this challenge is for you to write the code for the roll method. It won't be exactly like anything in the videos, but the videos have covered the concepts of method construction (and the concept of a class method, which may come in handy here).

When the instructions say "I'm going to use code similar to Hand.roll(2) ..." they are letting you know that the method will take one argument which will be the number of D20s that the Hand instance you create should have in it.