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

🤑 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

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

  • 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
    • Showing results for:
    • Python
    • Python Basics (2015)
    • Number Game App
    • Number Game Introduction
    • Close
  • 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 on Apr 30, 2018 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 on Apr 24, 2018 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 on Apr 7, 2018 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 on Apr 4, 2018 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 on Mar 19, 2018 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 on Mar 6, 2018 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 on Feb 6, 2018 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 on Jan 11, 2018 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 on Nov 29, 2017 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 on Nov 15, 2017 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 on Oct 21, 2017 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 on Oct 9, 2017 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 on Sep 25, 2017 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 on Sep 22, 2017 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 on Aug 11, 2017 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 on Jul 23, 2017 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 on Jun 27, 2017 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 on Jun 17, 2017 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 on Apr 16, 2017 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 on Jan 21, 2017 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 on Dec 18, 2016 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 on Nov 28, 2016 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 on Oct 24, 2016 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 on Sep 1, 2016 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 on Aug 7, 2016 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 on Jun 27, 2016 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 on Jun 22, 2016 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 on Apr 26, 2016 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 on Feb 12, 2016 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.