🤑 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
  • Cameron Ganley
    Cameron Ganley
    4,049 Points

    Console is not recognizing the play.py file.

    Posted October 26, 2023 9:44pm by Cameron Ganley
    Cameron Ganley
    4,049 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

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

    we set the value into string in Numstring class, but why the output of print(five) is an integer?

    Posted November 24, 2020 11:16am by Begana Choi
    Begana Choi
    Courses Plus Student 13,126 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

  • keith frazier
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    keith frazier
    Python Development Techdegree Student 5,771 Points

    Why wouldn't I use this as real code? [4:30]

    Posted July 24, 2020 9:02pm by keith frazier
    .a{fill-rule:evenodd;}techdegree
    keith frazier
    Python Development Techdegree Student 5,771 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

  • Keith Griffin
    Keith Griffin
    4,833 Points

    Why am I not getting the "Thief: Keith" output?

    Posted July 9, 2020 12:49am by Keith Griffin
    Keith Griffin
    4,833 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

  • Aizah Sadiq
    Aizah Sadiq
    2,435 Points

    Why is this not working

    Posted June 23, 2020 5:45pm by Aizah Sadiq
    Aizah Sadiq
    2,435 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

  • Aizah Sadiq
    Aizah Sadiq
    2,435 Points

    I've lost all my code for thieves

    Posted June 23, 2020 5:34pm by Aizah Sadiq
    Aizah Sadiq
    2,435 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    2 Answers

  • Arink Bertrand
    Arink Bertrand
    10,165 Points

    AttributeError: 'Thief' object has no attribute 'name'

    Posted June 17, 2020 6:54pm by Arink Bertrand
    Arink Bertrand
    10,165 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

  • Max Palmer
    Max Palmer
    2,920 Points

    When you import a class what is the numstring you import NumString from?

    Posted June 6, 2020 9:47pm by Max Palmer
    Max Palmer
    2,920 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

  • Elena Chen
    Elena Chen
    1,503 Points

    Why am I getting this error? AttributeError: type object 'str' has no attribute 'value'

    Posted May 23, 2020 6:36am by Elena Chen
    Elena Chen
    1,503 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

  • Kohei Ashida
    Kohei Ashida
    4,882 Points

    Why is there str(value) in the first def

    Posted May 17, 2020 9:19am by Kohei Ashida
    Kohei Ashida
    4,882 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    2 Answers

  • brandon supinski
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    brandon supinski
    Python Development Techdegree Graduate 27,983 Points

    getting ModuleNotFoundError: No module named 'numstring

    Posted February 10, 2020 9:54pm by brandon supinski
    .a{fill-rule:evenodd;}techdegree seal-36
    brandon supinski
    Python Development Techdegree Graduate 27,983 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    3 Answers

  • daniel steinberg
    daniel steinberg
    14,651 Points

    def __str__(self): return "{}: {}".format(self.__class__.__name__, self.name)

    Posted September 24, 2019 6:58pm by daniel steinberg
    daniel steinberg
    14,651 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

  • Kurobe Kuro^T_T^
    Kurobe Kuro^T_T^
    5,369 Points

    i dont get it, is __int__, __float__, __init__, and__name__ names or variavles name or they have they own use??

    Posted August 14, 2019 1:42am by Kurobe Kuro^T_T^
    Kurobe Kuro^T_T^
    5,369 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

  • anthony pizarro
    anthony pizarro
    1,983 Points

    __str__ and so on

    Posted May 14, 2019 10:28pm by anthony pizarro
    anthony pizarro
    1,983 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

  • Leo Marco Corpuz
    Leo Marco Corpuz
    18,975 Points

    __class__.__name__?

    Posted January 17, 2019 11:39am by Leo Marco Corpuz
    Leo Marco Corpuz
    18,975 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    2 Answers

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

    getting error __init__() takes 1 positional argument but two were given

    Posted December 10, 2018 1:49pm by ryanosten
    .a{fill-rule:evenodd;}techdegree
    ryanosten
    PHP Development Techdegree Student 29,615 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

  • Jeremy Millar
    PLUS
    Jeremy Millar
    Courses Plus Student 3,375 Points

    Help as to why this code isn't getting the name and class to output in the terminal?

    Posted September 7, 2018 8:50pm by Jeremy Millar
    Jeremy Millar
    Courses Plus Student 3,375 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    0 Answers

  • Nikita Krasnov
    Nikita Krasnov
    210 Points

    Can't receive the same result with __str__ function.

    Posted September 7, 2018 11:28am by Nikita Krasnov
    Nikita Krasnov
    210 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

  • Kafe Hezam
    Kafe Hezam
    11,070 Points

    When Kenneth calls the instance five it returns back the object, why is that?

    Posted August 8, 2018 6:00pm by Kafe Hezam
    Kafe Hezam
    11,070 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

  • Maxmillan Muchena
    Maxmillan Muchena
    2,478 Points

    cannot run program in shell

    Posted August 7, 2018 2:45pm by Maxmillan Muchena
    Maxmillan Muchena
    2,478 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    2 Answers

  • Abubakar Gataev
    Abubakar Gataev
    2,226 Points

    Workspsces doesn't work

    Posted March 6, 2018 7:04pm by Abubakar Gataev
    Abubakar Gataev
    2,226 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    2 Answers

  • Andrew McLane
    Andrew McLane
    3,385 Points

    Magic Methods Help

    Posted December 11, 2017 1:37am by Andrew McLane
    Andrew McLane
    3,385 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

  • Suraj Shah
    Suraj Shah
    1,055 Points

    magic methods

    Posted July 29, 2017 3:23pm by Suraj Shah
    Suraj Shah
    1,055 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

  • Jay Norris
    Jay Norris
    14,824 Points

    Conversions: Instance into dictionary

    Posted April 26, 2017 10:12pm by Jay Norris
    Jay Norris
    14,824 Points
    • Python
    • Object-Oriented Python
    • Advanced Objects
    • Controlling Conversion

    1 Answer

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.