๐Ÿค‘ 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

  • 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
    • Community Projects
    • Live Sessions
    • 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
  • Community Projects Live Sessions 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
  • amandae
    amandae
    15,727 Points

    int object has no attribute 'num_die'

    Posted August 17, 2021 7:47pm 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 December 7, 2020 5:55am 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 December 4, 2020 11:08am 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 November 8, 2020 11:47pm 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 September 21, 2020 7:47pm 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 August 8, 2020 2:26pm 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 June 10, 2020 10:36am 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 June 7, 2020 4:23pm 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 June 1, 2020 4:06pm 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 March 26, 2020 8:25pm 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 March 26, 2020 8:12pm 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 March 9, 2020 5:32am 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 January 16, 2020 12:35pm 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 December 31, 2019 7:48am 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 October 23, 2019 1:30pm 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 September 30, 2019 2:46pm 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 September 21, 2019 9:46pm 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 June 28, 2019 11:59pm 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 December 23, 2018 4:00pm 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 November 27, 2018 9:29am 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 November 27, 2018 9:24am 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 October 4, 2018 11:10pm 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 September 20, 2018 9:21pm 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 August 16, 2018 1:23am 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 July 24, 2018 1:03am 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 December 20, 2017 7:20pm by Andrew McLane
    Andrew McLane
    3,385 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Giving a Hand

    1 Answer

  • hamsternation
    hamsternation
    26,616 Points

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

    Posted July 29, 2017 6:56am by hamsternation
    hamsternation
    26,616 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 July 16, 2017 6:38am 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 July 16, 2017 5:43am 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.