🤑 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
  • fahad lashari
    fahad lashari
    7,693 Points

    Why was the while loop that runs the game implemented into the def __init__() function?

    Posted January 18, 2017 5:46pm by fahad lashari
    fahad lashari
    7,693 Points
    • Python
    • Object-Oriented Python (retired)
    • Hack-n-Slash
    • Game Planning

    2 Answers

  • Jeff Hartl
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Jeff Hartl
    Python Web Development Techdegree Student 8,420 Points

    Why define Game as a class?

    Posted July 13, 2016 10:42pm by Jeff Hartl
    .a{fill-rule:evenodd;}techdegree
    Jeff Hartl
    Python Web Development Techdegree Student 8,420 Points
    • Python
    • Object-Oriented Python (retired)
    • Hack-n-Slash
    • Game Planning

    1 Answer

  • henry jefferson
    henry jefferson
    2,136 Points

    Is this an instance?

    Posted July 10, 2016 8:49am by henry jefferson
    henry jefferson
    2,136 Points
    • Python
    • Object-Oriented Python (retired)
    • Hack-n-Slash
    • Game Planning

    1 Answer

  • jsdevtom
    jsdevtom
    16,963 Points

    Is there benefit in importing the individual submodules instead of the whole module in Python?

    Posted May 24, 2016 9:06pm by jsdevtom
    jsdevtom
    16,963 Points
    • Python
    • Object-Oriented Python (retired)
    • Hack-n-Slash
    • Game Planning

    2 Answers

  • jiyoung oh
    jiyoung oh
    6,324 Points

    self.monster or self.monsters

    Posted May 8, 2016 7:24am by jiyoung oh
    jiyoung oh
    6,324 Points
    • Python
    • Object-Oriented Python (retired)
    • Hack-n-Slash
    • Game Planning

    1 Answer

  • Onur Salman
    Onur Salman
    3,612 Points

    The workspace code loads with bunch of red highlighted code

    Posted April 2, 2016 2:50pm by Onur Salman
    Onur Salman
    3,612 Points
    • Python
    • Object-Oriented Python (retired)
    • Hack-n-Slash
    • Game Planning

    3 Answers

  • saro lin
    PLUS
    saro lin
    Courses Plus Student 531 Points

    Game planning method? ?

    Posted January 31, 2016 6:14am by saro lin
    saro lin
    Courses Plus Student 531 Points
    • Python
    • Object-Oriented Python (retired)
    • Hack-n-Slash
    • Game Planning

    1 Answer

  • peter keves
    peter keves
    6,854 Points

    If statement

    Posted August 29, 2015 2:25pm by peter keves
    peter keves
    6,854 Points
    • Python
    • Object-Oriented Python (retired)
    • Hack-n-Slash
    • Game Planning

    1 Answer

  • joleneoropilla
    joleneoropilla
    17,214 Points

    Why import all the individual sub-classes instead of just the main module?

    Posted May 8, 2015 11:22pm by joleneoropilla
    joleneoropilla
    17,214 Points
    • Python
    • Object-Oriented Python (retired)
    • Hack-n-Slash
    • Game Planning

    1 Answer

  • vincent schouten
    vincent schouten
    9,687 Points

    It's not clear to me the difference between __init__ and setup.

    Posted December 30, 2014 12:24pm by vincent schouten
    vincent schouten
    9,687 Points
    • Python
    • Object-Oriented Python (retired)
    • Hack-n-Slash
    • Game Planning

    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.