✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
    • Showing results for:
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand
    • Close
  • amandae
    amandae
    15,727 Points

    int object has no attribute 'num_die'

    Posted on Aug 17, 2021 by amandae
    amandae
    15,727 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    3 Answers

  • Eric Peppler
    Eric Peppler
    3,675 Points

    NameError

    Posted on Dec 7, 2020 by Eric Peppler
    Eric Peppler
    3,675 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    2 Answers

  • Begana Choi
    PLUS
    Begana Choi
    Courses Plus Student 13,126 Points

    How to import a class to another python file? (using Visual Studio Code)

    Posted on Dec 4, 2020 by Begana Choi
    Begana Choi
    Courses Plus Student 13,126 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    1 Answer

  • jayda hendrickson
    jayda hendrickson
    3,413 Points

    *args and **kwargs

    Posted on Nov 8, 2020 by jayda hendrickson
    jayda hendrickson
    3,413 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    1 Answer

  • Jonathan Gonzalez
    Jonathan Gonzalez
    8,544 Points

    Do the instances of D6 have names?

    Posted on Sep 21, 2020 by Jonathan Gonzalez
    Jonathan Gonzalez
    8,544 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    1 Answer

  • spencer tintorri
    spencer tintorri
    6,184 Points

    Why does ```hand.die_class``` and ```hand.size``` throw an AttributeError

    Posted on Aug 8, 2020 by spencer tintorri
    spencer tintorri
    6,184 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    1 Answer

  • Adebayo Samuel Ojo
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Adebayo Samuel Ojo
    PHP Development Techdegree Student 12,790 Points

    Where is class "list"?

    Posted on Jun 10, 2020 by Adebayo Samuel Ojo
    .a{fill-rule:evenodd;}techdegree
    Adebayo Samuel Ojo
    PHP Development Techdegree Student 12,790 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    1 Answer

  • Nicholas Abate
    Nicholas Abate
    1,643 Points

    self.append, die_class(), and self.sort

    Posted on Jun 7, 2020 by Nicholas Abate
    Nicholas Abate
    1,643 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    2 Answers

  • Kohei Ashida
    Kohei Ashida
    4,882 Points

    Why is "__repr__" used here? and Why should it return with str() function?

    Posted on Jun 1, 2020 by Kohei Ashida
    Kohei Ashida
    4,882 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    3 Answers

  • Eldin Guzin
    Eldin Guzin
    6,010 Points

    I am lost...

    Posted on Mar 26, 2020 by Eldin Guzin
    Eldin Guzin
    6,010 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    4 Answers

  • Eldin Guzin
    Eldin Guzin
    6,010 Points

    Error when trying to test my code

    Posted on Mar 26, 2020 by Eldin Guzin
    Eldin Guzin
    6,010 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    1 Answer

  • Bharat B
    Bharat B
    535 Points

    why is list sorting dependent on output of repr

    Posted on Mar 9, 2020 by Bharat B
    Bharat B
    535 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    2 Answers

  • Prateek Sharan Lall
    Prateek Sharan Lall
    1,778 Points

    TypeError: '<' not supported between instances of 'D6' and 'D6'

    Posted on Jan 16, 2020 by Prateek Sharan Lall
    Prateek Sharan Lall
    1,778 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    2 Answers

  • Amir Shahabnia
    PLUS
    Amir Shahabnia
    Courses Plus Student 29,310 Points

    Get AttributeError while trying to get hand[0].value

    Posted on Dec 31, 2019 by Amir Shahabnia
    Amir Shahabnia
    Courses Plus Student 29,310 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    1 Answer

  • jdee
    jdee
    6,655 Points

    Why doesn't my D6 have 'value' attribute?

    Posted on Oct 23, 2019 by jdee
    jdee
    6,655 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    4 Answers

  • Jonathan Dell'Ova
    PLUS
    Jonathan Dell'Ova
    Courses Plus Student 6,283 Points

    Don't understand why there I get "TypeError: 'str' object cannot be interpreted as an integer" in my code

    Posted on Sep 30, 2019 by Jonathan Dell'Ova
    Jonathan Dell'Ova
    Courses Plus Student 6,283 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    1 Answer

  • YZ L
    YZ L
    6,184 Points

    TypeError

    Posted on Sep 21, 2019 by YZ L
    YZ L
    6,184 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    1 Answer

  • Marcus Schumacher
    Marcus Schumacher
    16,616 Points

    What is the point of passing *args and **kwargs in the __init__ of Hand and YatzyHand classes?

    Posted on Jun 28, 2019 by Marcus Schumacher
    Marcus Schumacher
    16,616 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    2 Answers

  • Jay Reyes
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Jay Reyes
    Python Web Development Techdegree Student 15,937 Points

    Why don’t we need to pass those keyword arguments of YatzyHand in it's own __init__?

    Posted on Dec 23, 2018 by Jay Reyes
    .a{fill-rule:evenodd;}techdegree
    Jay Reyes
    Python Web Development Techdegree Student 15,937 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    0 Answers

  • Akshaan Mazumdar
    Akshaan Mazumdar
    3,787 Points

    How does self.sort() work??? how does self.sort automatically sort on the basis of class.values and not anything else?

    Posted on Nov 27, 2018 by Akshaan Mazumdar
    Akshaan Mazumdar
    3,787 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    2 Answers

  • Akshaan Mazumdar
    Akshaan Mazumdar
    3,787 Points

    Why do we call super in the Hand class >(class Hand (list):) when it does not actually extend from any other superclass?

    Posted on Nov 27, 2018 by Akshaan Mazumdar
    Akshaan Mazumdar
    3,787 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    2 Answers

  • liamthornback2
    liamthornback2
    9,618 Points

    TypeError

    Posted on Oct 4, 2018 by liamthornback2
    liamthornback2
    9,618 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    1 Answer

  • James Estrada
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    James Estrada
    Full Stack JavaScript Techdegree Student 25,867 Points

    Can somebody explain the special method __repr__?

    Posted on Sep 20, 2018 by James Estrada
    .a{fill-rule:evenodd;}techdegree
    James Estrada
    Full Stack JavaScript Techdegree Student 25,867 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    1 Answer

  • Gabrielle Lamarche
    Gabrielle Lamarche
    8,587 Points

    Workspaces adding folder to console

    Posted on Aug 16, 2018 by Gabrielle Lamarche
    Gabrielle Lamarche
    8,587 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    1 Answer

  • Kafe Hezam
    Kafe Hezam
    11,070 Points

    I don't understand what does die_class() in the for loop do and why is it usefull?

    Posted on Jul 24, 2018 by Kafe Hezam
    Kafe Hezam
    11,070 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    2 Answers

  • Andrew McLane
    Andrew McLane
    3,385 Points

    need help with understanding super() use.

    Posted on Dec 20, 2017 by Andrew McLane
    Andrew McLane
    3,385 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    1 Answer

  • hamsternation
    hamsternation
    26,617 Points

    Why does Kenneth pass in the *args and **kwargs if we don't need them?

    Posted on Jul 29, 2017 by hamsternation
    hamsternation
    26,617 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    2 Answers

  • Justyna Julia Jamróz
    Justyna Julia Jamróz
    13,354 Points

    Help with for loop part

    Posted on Jul 16, 2017 by Justyna Julia Jamróz
    Justyna Julia Jamróz
    13,354 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    1 Answer

  • taejooncho
    PLUS
    taejooncho
    Courses Plus Student 3,923 Points

    copied the code exactly from the video, but when I try Python runs NameError.

    Posted on Jul 16, 2017 by taejooncho
    taejooncho
    Courses Plus Student 3,923 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    2 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.