Skip to main content

NOTICE: On Friday Nov 6, Workspaces will be temporarily unavailable for maintenance.

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

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

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

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • 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
      • • Vibe Coding
  • Cameron Ganley
    Cameron Ganley
    4,050 Points

    How to get into subfolder "yatzy"

    Posted November 1, 2023 7:43pm by Cameron Ganley
    Cameron Ganley
    4,050 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
    Jonathan Grieve
    91,254 Points

    int() - TypeError, Argument must be a string

    Posted October 31, 2019 10:55am by Jonathan Grieve
    Jonathan Grieve
    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.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

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

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord