Skip to main content

🛍️ BLACK FRIDAY get-one-give-one sale is underway. Don't miss $50 off PLUS a free subscription to gift a friend. 🤩

🚀 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! 🤑

  • 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
  • Hanwen Zhang
    Hanwen Zhang
    20,084 Points

    What does the character import Theft work in the video? In the repl?

    Posted April 16, 2021 3:01am by Hanwen Zhang
    Hanwen Zhang
    20,084 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    1 Answer

  • Hanwen Zhang
    Hanwen Zhang
    20,084 Points

    What does the import random means in Python?

    Posted April 16, 2021 2:32am by Hanwen Zhang
    Hanwen Zhang
    20,084 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    1 Answer

  • Elena Chen
    Elena Chen
    1,503 Points

    Questions about attributes and self

    Posted May 16, 2020 7:01am by Elena Chen
    Elena Chen
    1,503 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    1 Answer

  • James Ball
    James Ball
    2,074 Points

    Why does kenneth.pickpocket(self) return an error?

    Posted December 12, 2019 1:30pm by James Ball
    James Ball
    2,074 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    1 Answer

  • Tiana Manzano
    PLUS
    Tiana Manzano
    Courses Plus Student 2,248 Points

    Running kenneth.pickpocket()

    Posted August 14, 2019 3:28pm by Tiana Manzano
    Tiana Manzano
    Courses Plus Student 2,248 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    1 Answer

  • Anthony Piscocama
    Anthony Piscocama
    4,328 Points

    I am getting a NameError: name 'self is not defined.

    Posted July 26, 2019 1:32am by Anthony Piscocama
    Anthony Piscocama
    4,328 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    1 Answer

  • anthony pizarro
    anthony pizarro
    1,983 Points

    random.ranint

    Posted May 6, 2019 12:12am by anthony pizarro
    anthony pizarro
    1,983 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    1 Answer

  • Muhammad Umar
    Muhammad Umar
    7,906 Points

    HELP ME

    Posted April 3, 2019 6:18pm by Muhammad Umar
    Muhammad Umar
    7,906 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    1 Answer

  • Zach Daniels
    Zach Daniels
    1,606 Points

    Cant import my Class... 'from can't read /var/mail/char'

    Posted March 11, 2019 5:07pm by Zach Daniels
    Zach Daniels
    1,606 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    2 Answers

  • rhupp
    rhupp
    11,019 Points

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

    Posted February 19, 2019 7:37pm by rhupp
    rhupp
    11,019 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    3 Answers

  • craigs love
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    craigs love
    Python Web Development Techdegree Student 96 Points

    what can do .randint()

    Posted February 4, 2019 10:34am by craigs love
    .a{fill-rule:evenodd;}techdegree
    craigs love
    Python Web Development Techdegree Student 96 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    1 Answer

  • Michael Cook
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Michael Cook
    Full Stack JavaScript Techdegree Graduate 28,975 Points

    Does 'self' in Python basically behave the same as 'this' in JavaScript?

    Posted January 3, 2019 12:52am by Michael Cook
    .a{fill-rule:evenodd;}techdegree seal-36
    Michael Cook
    Full Stack JavaScript Techdegree Graduate 28,975 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    1 Answer

  • Hai Phan
    Hai Phan
    2,442 Points

    What is the difference between kenneth.pickpocket() and Thief.pickpocket(arg) exactly?

    Posted December 9, 2018 3:36pm by Hai Phan
    Hai Phan
    2,442 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    2 Answers

  • Hanna Han
    Hanna Han
    4,105 Points

    What does "if self.sneaky:" mean exactly?

    Posted December 4, 2018 1:08pm by Hanna Han
    Hanna Han
    4,105 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    2 Answers

  • Hanna Han
    Hanna Han
    4,105 Points

    Thief().pickpocket()

    Posted November 14, 2018 7:57am by Hanna Han
    Hanna Han
    4,105 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    1 Answer

  • Kevin S
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Kevin S
    Data Analysis Techdegree Student 15,862 Points

    I changed kenneth.sneaky to an integer and this happened...Why

    Posted July 3, 2018 11:43am by Kevin S
    .a{fill-rule:evenodd;}techdegree
    Kevin S
    Data Analysis Techdegree Student 15,862 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    2 Answers

  • Elisha Bere
    Elisha Bere
    6,648 Points

    What is an instance of a class or method?

    Posted March 22, 2018 10:39am by Elisha Bere
    Elisha Bere
    6,648 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    1 Answer

  • Andrew McLane
    Andrew McLane
    3,385 Points

    self parameter help

    Posted December 2, 2017 11:47pm by Andrew McLane
    Andrew McLane
    3,385 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • Methods

    1 Answer

  • Michael Hall
    PLUS
    Michael Hall
    Courses Plus Student 30,909 Points

    Object-Oriented Python Methods NameError: name 'random' is not defined

    Posted August 23, 2017 5:15pm by Michael Hall
    Michael Hall
    Courses Plus Student 30,909 Points
    • Python
    • Object-Oriented Python
    • Instant Objects
    • 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