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

New No-Code Track! 🚀 New videos dropping every week—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
  • livia salgado
    livia salgado
    4,408 Points

    while true: vs while True: why if i use the first one it shows error? why it has to be capitalized

    Posted April 30, 2018 3:59pm by livia salgado
    livia salgado
    4,408 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    1 Answer

  • Nosayaba Omo-Ogbebor
    Nosayaba Omo-Ogbebor
    2,071 Points

    How do you know the type of library you want to import and the exact code you need in the library?

    Posted April 24, 2018 9:36am by Nosayaba Omo-Ogbebor
    Nosayaba Omo-Ogbebor
    2,071 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    1 Answer

  • Michael LaCroix
    Michael LaCroix
    5,828 Points

    Is something wrong with my code or the Python Shell?

    Posted April 7, 2018 1:08am by Michael LaCroix
    Michael LaCroix
    5,828 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    0 Answers

  • Maximiliane Quel
    PLUS
    Maximiliane Quel
    Courses Plus Student 55,489 Points

    Is there are reason we are not setting the condition in the while statement?

    Posted April 4, 2018 9:19pm by Maximiliane Quel
    Maximiliane Quel
    Courses Plus Student 55,489 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    1 Answer

  • Jackson Stitzel
    Jackson Stitzel
    551 Points

    Why can't I play my Number game?

    Posted March 19, 2018 3:29pm by Jackson Stitzel
    Jackson Stitzel
    551 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    2 Answers

  • Youssef Moustahib
    Youssef Moustahib
    7,779 Points

    Why do I keep getting this error message?

    Posted March 6, 2018 6:40pm by Youssef Moustahib
    Youssef Moustahib
    7,779 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    1 Answer

  • Jonathan Grieve
    MOD
    Jonathan Grieve
    Treehouse Moderator 91,254 Points

    My variation on the python number game

    Posted February 6, 2018 5:48pm by Jonathan Grieve
    Jonathan Grieve
    Treehouse Moderator 91,254 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    1 Answer

  • Nigel Chia
    Nigel Chia
    909 Points

    i tried to add +1 ,-1 to the secret number and it would say 'close'

    Posted January 11, 2018 8:50am by Nigel Chia
    Nigel Chia
    909 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    2 Answers

  • Thomas Kjørlaug
    Thomas Kjørlaug
    1,054 Points

    Need help with Even or Odd objective

    Posted November 29, 2017 12:49am by Thomas Kjørlaug
    Thomas Kjørlaug
    1,054 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    3 Answers

  • thomas2017
    thomas2017
    1,342 Points

    Intro to number game for python. why else: doesn't run in my program?

    Posted November 15, 2017 12:55am by thomas2017
    thomas2017
    1,342 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    3 Answers

  • srikanth soma
    srikanth soma
    1,572 Points

    guess number not working correctly

    Posted October 21, 2017 11:13pm by srikanth soma
    srikanth soma
    1,572 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    2 Answers

  • Emilio Andere
    Emilio Andere
    495 Points

    Console is not working

    Posted October 9, 2017 12:09am by Emilio Andere
    Emilio Andere
    495 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    1 Answer

  • Arikaturika Tumojenko
    Arikaturika Tumojenko
    8,897 Points

    ValuerError: invalid literal for int() with base 10: '' meaning?

    Posted September 25, 2017 8:56pm by Arikaturika Tumojenko
    Arikaturika Tumojenko
    8,897 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    2 Answers

  • Mike McCarron
    Mike McCarron
    1,349 Points

    tried creating function to hold "get secret number" logic, keep running into NameError

    Posted September 22, 2017 9:24am by Mike McCarron
    Mike McCarron
    1,349 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    2 Answers

  • Jessica Yan
    Jessica Yan
    700 Points

    while True:

    Posted August 11, 2017 12:36pm by Jessica Yan
    Jessica Yan
    700 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    2 Answers

  • Umair iqbal
    Umair iqbal
    910 Points

    why am i getting a syntax error?

    Posted July 23, 2017 6:46am by Umair iqbal
    Umair iqbal
    910 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    2 Answers

  • Zhuxiao Gu
    Zhuxiao Gu
    574 Points

    what does "while True" really mean?

    Posted June 27, 2017 4:14am by Zhuxiao Gu
    Zhuxiao Gu
    574 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    1 Answer

  • Abdullah Jassim
    Abdullah Jassim
    4,551 Points

    I get a syntax error everytime I run the script

    Posted June 17, 2017 11:46am by Abdullah Jassim
    Abdullah Jassim
    4,551 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    3 Answers

  • Aboudi ABU SAMRA
    Aboudi ABU SAMRA
    1,000 Points

    Need to know

    Posted April 16, 2017 3:30am by Aboudi ABU SAMRA
    Aboudi ABU SAMRA
    1,000 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    1 Answer

  • Ian McGlory
    Ian McGlory
    1,997 Points

    Trouble importing module?

    Posted January 21, 2017 8:29pm by Ian McGlory
    Ian McGlory
    1,997 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    2 Answers

  • Sergej Dolezil
    Sergej Dolezil
    958 Points

    Using a function for user input?

    Posted December 18, 2016 9:21pm by Sergej Dolezil
    Sergej Dolezil
    958 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    1 Answer

  • fahad lashari
    fahad lashari
    7,693 Points

    Here is my refinement of the number game:

    Posted November 28, 2016 8:44pm by fahad lashari
    fahad lashari
    7,693 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    2 Answers

  • Sean Flanagan
    Sean Flanagan
    33,236 Points

    My refinement of number_game.py

    Posted October 24, 2016 6:54pm by Sean Flanagan
    Sean Flanagan
    33,236 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    0 Answers

  • Jesse Penber
    Jesse Penber
    432 Points

    Syntax Error for the "if guess" line when I copy this code verbatim (minus the comments) into Workspaces.

    Posted September 1, 2016 9:55pm by Jesse Penber
    Jesse Penber
    432 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    0 Answers

  • Jason Bourne
    Jason Bourne
    2,301 Points

    Having a problem implementing additional functionality

    Posted August 7, 2016 1:07am by Jason Bourne
    Jason Bourne
    2,301 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    3 Answers

  • Aditya Agarwal
    PLUS
    Aditya Agarwal
    Courses Plus Student 564 Points

    Why syntax error?

    Posted June 27, 2016 6:13pm by Aditya Agarwal
    Aditya Agarwal
    Courses Plus Student 564 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    2 Answers

  • Ross McPherson
    Ross McPherson
    774 Points

    Number Game, Program Won't Work!

    Posted June 22, 2016 9:56pm by Ross McPherson
    Ross McPherson
    774 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    3 Answers

  • Unsubscribed User
    Unsubscribed User
    7,260 Points

    Game not posing question

    Posted April 26, 2016 2:20pm by Unsubscribed User
    Unsubscribed User
    7,260 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    3 Answers

  • Jonathan Caver
    Jonathan Caver
    2,222 Points

    Random Number game

    Posted February 12, 2016 9:30pm by Jonathan Caver
    Jonathan Caver
    2,222 Points
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction

    1 Answer

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.