✨ 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
    • Advanced Objects
    • Controlling Conversion
    • Close
  • Cameron Ganley
    Cameron Ganley
    4,049 Points

    Console is not recognizing the play.py file.

    Posted on Oct 26, 2023 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 on Nov 24, 2020 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 on Jul 24, 2020 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 on Jul 9, 2020 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 on Jun 23, 2020 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 on Jun 23, 2020 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 on Jun 17, 2020 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 on Jun 6, 2020 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 on May 23, 2020 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 on May 17, 2020 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 on Feb 10, 2020 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 on Sep 24, 2019 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 on Aug 14, 2019 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 on May 14, 2019 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 on Jan 17, 2019 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 on Dec 10, 2018 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 on Sep 7, 2018 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 on Sep 7, 2018 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 on Aug 8, 2018 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 on Aug 7, 2018 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 on Mar 6, 2018 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 on Dec 11, 2017 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 on Jul 29, 2017 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 on Apr 26, 2017 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.