✨ 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
    • Comparing and Combining Dice
    • Close
  • Cameron Ganley
    Cameron Ganley
    4,049 Points

    How to get into subfolder "yatzy"

    Posted on Nov 1, 2023 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 on Oct 22, 2020 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 on Oct 22, 2020 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 on Jul 30, 2020 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 on Jul 18, 2020 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 on Feb 10, 2020 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 on Oct 31, 2019 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 on Mar 22, 2019 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 on Dec 22, 2018 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 on Nov 28, 2018 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 on Nov 8, 2018 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 on Aug 17, 2018 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 on Jun 15, 2018 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 on May 21, 2018 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 on Mar 1, 2018 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 on Jan 16, 2018 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 on Jan 7, 2018 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 on Oct 6, 2017 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 on Aug 30, 2017 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 on Aug 14, 2017 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 on Jul 6, 2017 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.