Skip to main content

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

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

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

  • 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
  • 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,761 Points

    Method with Megan Amendola

    Posted July 29, 2022 7:56am by Faris Rachmadyo
    Faris Rachmadyo
    1,761 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.

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