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

New No-Code Track! 🚀 New videos dropping every week—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
  • Cameron Ganley
    Cameron Ganley
    4,049 Points

    How to get into subfolder "yatzy"

    Posted November 1, 2023 7:43pm by Cameron Ganley
    Cameron Ganley
    4,049 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    1 Answer

  • Tinotenda Mangarai
    Tinotenda Mangarai
    3,828 Points

    Opening python files

    Posted October 22, 2020 9:58am by Tinotenda Mangarai
    Tinotenda Mangarai
    3,828 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    1 Answer

  • Tinotenda Mangarai
    Tinotenda Mangarai
    3,828 Points

    Opening python files

    Posted October 22, 2020 9:57am by Tinotenda Mangarai
    Tinotenda Mangarai
    3,828 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    0 Answers

  • Nikolai Olekhnovitch
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Nikolai Olekhnovitch
    Front End Web Development Techdegree Graduate 25,617 Points

    We used __radd__ to add reflective additions to instances, why not now in the comparison methods? Thank you

    Posted July 30, 2020 7:15pm by Nikolai Olekhnovitch
    .a{fill-rule:evenodd;}techdegree seal-36
    Nikolai Olekhnovitch
    Front End Web Development Techdegree Graduate 25,617 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    1 Answer

  • Aizah Sadiq
    Aizah Sadiq
    2,435 Points

    Addition is not working

    Posted July 18, 2020 10:45pm by Aizah Sadiq
    Aizah Sadiq
    2,435 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    2 Answers

  • Kortney Field
    Kortney Field
    14,091 Points

    TypeError: int() argument must be a string, a bytes-like object or a number, not 'D6'

    Posted February 10, 2020 3:48pm by Kortney Field
    Kortney Field
    14,091 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    2 Answers

  • Jonathan Grieve
    MOD
    Jonathan Grieve
    Treehouse Moderator 91,254 Points

    int() - TypeError, Argument must be a string

    Posted October 31, 2019 10:55am by Jonathan Grieve
    Jonathan Grieve
    Treehouse Moderator 91,254 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    4 Answers

  • RadosÅ‚aw Kalina
    Radosław Kalina
    13,085 Points

    Why we use class to make a dice ?

    Posted March 22, 2019 11:36pm by Radosław Kalina
    Radosław Kalina
    13,085 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    1 Answer

  • ryanosten
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    ryanosten
    PHP Development Techdegree Student 29,615 Points

    Why don't you have to convert other to an int?

    Posted December 22, 2018 10:31pm by ryanosten
    .a{fill-rule:evenodd;}techdegree
    ryanosten
    PHP Development Techdegree Student 29,615 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    3 Answers

  • Akshaan Mazumdar
    Akshaan Mazumdar
    3,787 Points

    In the last magic method - radd- Kenneth says something which has me confused!! >>> int(self) + other VS self + other

    Posted November 28, 2018 12:56pm by Akshaan Mazumdar
    Akshaan Mazumdar
    3,787 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    1 Answer

  • Saul Goldman
    Saul Goldman
    1,539 Points

    It tells me I get an unexpected key word argument "sides"? This on my super init line

    Posted November 8, 2018 12:32am by Saul Goldman
    Saul Goldman
    1,539 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    1 Answer

  • Steven Tagawa
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Steven Tagawa
    Python Development Techdegree Graduate 14,438 Points

    Inheriting magic methods

    Posted August 17, 2018 4:20am by Steven Tagawa
    .a{fill-rule:evenodd;}techdegree seal-36
    Steven Tagawa
    Python Development Techdegree Graduate 14,438 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    1 Answer

  • leonardo valdes
    leonardo valdes
    12,384 Points

    self.value vs self

    Posted June 15, 2018 9:12pm by leonardo valdes
    leonardo valdes
    12,384 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    1 Answer

  • Joseph Raker
    PLUS
    Joseph Raker
    Courses Plus Student 3,354 Points

    Comparing and Combining Dice questions

    Posted May 21, 2018 2:29pm by Joseph Raker
    Joseph Raker
    Courses Plus Student 3,354 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    2 Answers

  • nuri jeon
    nuri jeon
    14,376 Points

    I don't know where to pass the arguments.(Between __init__ or super()__init__())

    Posted March 1, 2018 4:23am by nuri jeon
    nuri jeon
    14,376 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    1 Answer

  • Simon Amz
    Simon Amz
    4,606 Points

    Interest of magic method

    Posted January 16, 2018 12:16pm by Simon Amz
    Simon Amz
    4,606 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    1 Answer

  • Mohammad Aslam
    Mohammad Aslam
    6,053 Points

    Can't get to the correct directory for Die D6 classes

    Posted January 7, 2018 12:31am by Mohammad Aslam
    Mohammad Aslam
    6,053 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    2 Answers

  • Stefano Nebiolo
    Stefano Nebiolo
    1,991 Points

    Comparing and Combining Dice. int(self) not clear

    Posted October 6, 2017 11:55am by Stefano Nebiolo
    Stefano Nebiolo
    1,991 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    1 Answer

  • Idan shami
    Idan shami
    13,251 Points

    Comparing and Combining Dice: TypeError, help please (:

    Posted August 30, 2017 5:58pm by Idan shami
    Idan shami
    13,251 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    0 Answers

  • Clifford Gagliardo
    PLUS
    Clifford Gagliardo
    Courses Plus Student 15,069 Points

    Why do we need magic methods here?

    Posted August 14, 2017 8:57am by Clifford Gagliardo
    Clifford Gagliardo
    Courses Plus Student 15,069 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    6 Answers

  • Frank Campos
    Frank Campos
    4,175 Points

    Can somebody help me to use the attrs library that kenneth mentioned?

    Posted July 6, 2017 4:54pm by Frank Campos
    Frank Campos
    4,175 Points
    • Python
    • Object-Oriented Python
    • Dice Roller
    • Comparing and Combining Dice

    4 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.