🤑 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
  • Dominick Chism
    Dominick Chism
    8,857 Points

    Does the program she demonstrated make logical sense?

    Posted May 3, 2023 4:18am by Dominick Chism
    Dominick Chism
    8,857 Points
    • Python
    • Basic Object-Oriented Python
    • Welcome to OOP
    • Methods

    4 Answers

  • Setiawan Angga
    Setiawan Angga
    606 Points

    returned None def duration(self, power): print(f'lets mixing it baby! {power}')

    Posted March 29, 2023 6:39am by Setiawan Angga
    Setiawan Angga
    606 Points
    • Python
    • Basic Object-Oriented Python
    • Welcome to OOP
    • Methods

    1 Answer

  • Karyna Reut
    Karyna Reut
    1,611 Points

    How does self.gas -= 50 work?

    Posted March 14, 2023 9:49am by Karyna Reut
    Karyna Reut
    1,611 Points
    • Python
    • Basic Object-Oriented Python
    • Welcome to OOP
    • Methods

    2 Answers

  • Pedro Leitao
    Pedro Leitao
    1,615 Points

    "Return False" x " = False"

    Posted November 21, 2022 8:29pm by Pedro Leitao
    Pedro Leitao
    1,615 Points
    • Python
    • Basic Object-Oriented Python
    • Welcome to OOP
    • Methods

    1 Answer

  • Faris Rachmadyo
    Faris Rachmadyo
    1,760 Points

    Method with Megan Amendola

    Posted July 29, 2022 7:56am by Faris Rachmadyo
    Faris Rachmadyo
    1,760 Points
    • Python
    • Basic Object-Oriented Python
    • Welcome to OOP
    • Methods

    2 Answers

  • Kylie Nonemaker
    Kylie Nonemaker
    1,190 Points

    Clarification on use_gas method

    Posted April 25, 2022 4:25pm by Kylie Nonemaker
    Kylie Nonemaker
    1,190 Points
    • Python
    • Basic Object-Oriented Python
    • Welcome to OOP
    • Methods

    1 Answer

  • Lewis Mrozek
    Lewis Mrozek
    1,538 Points

    How does the self.use_gas() work?

    Posted September 23, 2021 6:01pm by Lewis Mrozek
    Lewis Mrozek
    1,538 Points
    • Python
    • Basic Object-Oriented Python
    • Welcome to OOP
    • Methods

    1 Answer

  • Roberto Quintero
    Roberto Quintero
    9,046 Points

    Why does my code run fine in workspaces but I get a SyntaxError on VS Code?

    Posted April 8, 2021 9:22pm by Roberto Quintero
    Roberto Quintero
    9,046 Points
    • Python
    • Basic Object-Oriented Python
    • Welcome to OOP
    • Methods

    1 Answer

  • aaron roberts
    aaron roberts
    2,004 Points

    need help with 'if self.is_moving' and 'if not self.is_moving'

    Posted March 9, 2021 5:25pm by aaron roberts
    aaron roberts
    2,004 Points
    • Python
    • Basic Object-Oriented Python
    • Welcome to OOP
    • Methods

    3 Answers

  • aaron roberts
    aaron roberts
    2,004 Points

    'if not' question.

    Posted March 8, 2021 5:27pm by aaron roberts
    aaron roberts
    2,004 Points
    • Python
    • Basic Object-Oriented Python
    • Welcome to OOP
    • Methods

    2 Answers

  • Kasey Knudsen
    Kasey Knudsen
    5,888 Points

    self.is_moving = False

    Posted February 11, 2021 11:25pm by Kasey Knudsen
    Kasey Knudsen
    5,888 Points
    • Python
    • Basic Object-Oriented Python
    • Welcome to OOP
    • Methods

    3 Answers

  • Luke Tate
    PLUS
    Luke Tate
    Courses Plus Student 2,256 Points

    Why do I get a function call before assignment error?

    Posted February 6, 2021 9:46pm by Luke Tate
    Luke Tate
    Courses Plus Student 2,256 Points
    • Python
    • Basic Object-Oriented Python
    • Welcome to OOP
    • Methods

    2 Answers

  • Timothy Mattingly
    Timothy Mattingly
    15,986 Points

    What happened to these method calls?

    Posted December 31, 2020 4:02am by Timothy Mattingly
    Timothy Mattingly
    15,986 Points
    • Python
    • Basic Object-Oriented Python
    • Welcome to OOP
    • Methods

    1 Answer

  • cgeorge
    cgeorge
    5,493 Points

    Why do you set attributes in __intit__ and in methods?

    Posted December 18, 2020 6:44pm by cgeorge
    cgeorge
    5,493 Points
    • Python
    • Basic Object-Oriented Python
    • Welcome to OOP
    • Methods

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