Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
221,328 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.