🤑 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
    • 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
  • jasper printemps
    jasper printemps
    4,398 Points

    Help with class Character please

    Posted April 6, 2017 4:52pm by jasper printemps
    jasper printemps
    4,398 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    2 Answers

  • Chuck Todd
    Chuck Todd
    8,295 Points

    INIT function allows user to override Weapon logic

    Posted March 17, 2017 10:46pm by Chuck Todd
    Chuck Todd
    8,295 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    2 Answers

  • fahad lashari
    fahad lashari
    7,693 Points

    Is adding specific data directly into the code bad?

    Posted January 17, 2017 2:17am by fahad lashari
    fahad lashari
    7,693 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    2 Answers

  • fahad lashari
    fahad lashari
    7,693 Points

    Need help please

    Posted January 7, 2017 11:39am by fahad lashari
    fahad lashari
    7,693 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • Jeremy Bradrick
    Jeremy Bradrick
    6,731 Points

    IronPython 2.7 errors out while Workspaces and PyCharm both work

    Posted December 31, 2016 12:12am by Jeremy Bradrick
    Jeremy Bradrick
    6,731 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • Kathryn Klarich
    Kathryn Klarich
    4,622 Points

    dunder init - why don't you have to call the function?

    Posted August 5, 2016 12:46pm by Kathryn Klarich
    Kathryn Klarich
    4,622 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • cody oberholtzer
    cody oberholtzer
    1,988 Points

    Why does pressing enter at weapon input(without typing anything), pass 'if weapon_choice in "SAB": ' and selects bow?

    Posted July 31, 2016 6:03pm by cody oberholtzer
    cody oberholtzer
    1,988 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • Xiaoqian Zhou
    Xiaoqian Zhou
    6,506 Points

    NameError: name '' is not defined

    Posted June 14, 2016 2:22am by Xiaoqian Zhou
    Xiaoqian Zhou
    6,506 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    3 Answers

  • zhulin peng
    zhulin peng
    4,472 Points

    getting NoneType weapon once input invalid weapon letter

    Posted June 8, 2016 6:53pm by zhulin peng
    zhulin peng
    4,472 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • Smith Thapa
    Smith Thapa
    7,023 Points

    Can not understand the loop given below

    Posted May 28, 2016 2:37pm by Smith Thapa
    Smith Thapa
    7,023 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    2 Answers

  • omri golan
    PLUS
    omri golan
    Courses Plus Student 15,836 Points

    class challange

    Posted February 26, 2016 6:07pm by omri golan
    omri golan
    Courses Plus Student 15,836 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    4 Answers

  • saro lin
    PLUS
    saro lin
    Courses Plus Student 531 Points

    challenge on instance metods

    Posted January 30, 2016 4:25pm by saro lin
    saro lin
    Courses Plus Student 531 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    2 Answers

  • saro lin
    PLUS
    saro lin
    Courses Plus Student 531 Points

    Error !!

    Posted January 30, 2016 4:07pm by saro lin
    saro lin
    Courses Plus Student 531 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • Maciej Walczak
    Maciej Walczak
    5,042 Points

    NameError: name 'get_weapon' is not defined

    Posted January 24, 2016 1:41pm by Maciej Walczak
    Maciej Walczak
    5,042 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    2 Answers

  • hlxogbdbew
    hlxogbdbew
    5,663 Points

    Getting Back None as weapon

    Posted December 17, 2015 9:09pm by hlxogbdbew
    hlxogbdbew
    5,663 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • Thiago Paulo
    Thiago Paulo
    3,076 Points

    Program not calling the input

    Posted October 27, 2015 6:39pm by Thiago Paulo
    Thiago Paulo
    3,076 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    2 Answers

  • elmira bonab
    elmira bonab
    3,471 Points

    what is the difference between self.get_weapon() and get_weapon(self)?

    Posted October 23, 2015 5:17am by elmira bonab
    elmira bonab
    3,471 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • Tobias Edwards
    Tobias Edwards
    14,458 Points

    What does setattr() actually do?

    Posted October 22, 2015 8:23pm by Tobias Edwards
    Tobias Edwards
    14,458 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • Chih-Wei Hsu
    Chih-Wei Hsu
    11,132 Points

    adding self before a variable name

    Posted October 8, 2015 5:07am by Chih-Wei Hsu
    Chih-Wei Hsu
    11,132 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • peter keves
    peter keves
    6,854 Points

    are keyword arguments basically key value pairs ?

    Posted August 29, 2015 12:42pm by peter keves
    peter keves
    6,854 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • Mar Bocatcat
    Mar Bocatcat
    7,405 Points

    __init__,__str__ (**kwargs) ??

    Posted August 7, 2015 2:38am by Mar Bocatcat
    Mar Bocatcat
    7,405 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • pietro capriata
    pietro capriata
    18,066 Points

    what mean "if weapon_choice in "sab" :" ? what is "sab"?

    Posted July 18, 2015 2:17pm by pietro capriata
    pietro capriata
    18,066 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • Homa Shayan
    Homa Shayan
    2,038 Points

    NameError: name 'kwargs, is not defined:

    Posted May 30, 2015 6:24pm by Homa Shayan
    Homa Shayan
    2,038 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • Stephen Poole
    Stephen Poole
    9,361 Points

    Could someone please remind me what **kwargs actually does?

    Posted May 18, 2015 1:59am by Stephen Poole
    Stephen Poole
    9,361 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    3 Answers

  • Igors Smirnovs
    Igors Smirnovs
    10,441 Points

    Attributes interesting test. What happens?

    Posted March 17, 2015 12:18pm by Igors Smirnovs
    Igors Smirnovs
    10,441 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    2 Answers

  • Welby Obeng
    Welby Obeng
    20,340 Points

    Why do you test if input is in sab? why not just start comparing input with s,a, or b?

    Posted February 19, 2015 6:50pm by Welby Obeng
    Welby Obeng
    20,340 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    4 Answers

  • Jean Beltre
    Jean Beltre
    1,181 Points

    Why do we unpack a dictionary, if there isn't a dictionary specified (Self, **kwargs) ?

    Posted February 14, 2015 7:46pm by Jean Beltre
    Jean Beltre
    1,181 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • Nicholas Cordoba
    Nicholas Cordoba
    4,998 Points

    Does not let me input a name.

    Posted January 28, 2015 7:29am by Nicholas Cordoba
    Nicholas Cordoba
    4,998 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    2 Answers

  • William LaMorie
    William LaMorie
    11,769 Points

    Index searching vs conditionals?

    Posted December 5, 2014 1:18am by William LaMorie
    William LaMorie
    11,769 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance Methods

    1 Answer

  • Hank de Roover
    Hank de Roover
    1,578 Points

    New objective?

    Posted October 3, 2014 9:33pm by Hank de Roover
    Hank de Roover
    1,578 Points
    • Python
    • Object-Oriented Python (retired)
    • Inheritance
    • Instance 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.