Python Forum
Thread Rating:
  • 2 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TKinter Hangman Game
#2
(Apr-02-2017, 02:45 PM)Bumble Wrote: letter = self.guess_ent.get()
while guesses != 0:

You read the user's guess before entering the while loop, and then never check it again. Which is a problem, because you continue to loop until guesses == 0, while you also only decrease guesses if it's an invalid choice, so if they guess a correct letter, the loop will never end.
Reply


Messages In This Thread
TKinter Hangman Game - by Bumble - Apr-02-2017, 02:45 PM
RE: TKinter Hangman Game - by nilamo - Jul-19-2017, 06:56 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Hangman Game - Multiple Letters Problem t0rn 4 4,758 Jun-05-2020, 11:27 AM
Last Post: t0rn
  Hangman metro17 4 3,052 Sep-18-2019, 10:59 AM
Last Post: perfringo
  Trouble coding hangman Tay 1 2,382 Mar-28-2019, 01:57 AM
Last Post: ichabod801
  Hangman code problem KrakowKid 1 2,419 Feb-25-2019, 06:29 PM
Last Post: ichabod801
  Python hangman help A1395 11 7,272 Feb-13-2019, 04:24 PM
Last Post: ichabod801
  Hangman 2skywalkers 3 75,156 Oct-19-2018, 01:49 PM
Last Post: ichabod801
  Hangman Help. 2skywalkers 4 4,235 Jun-26-2018, 02:49 AM
Last Post: ichabod801
  Python Hangman Replacing "_" with letters. 2skywalkers 6 12,171 Jun-25-2018, 12:01 PM
Last Post: gruntfutuk
  Simple Hangman Game Issue andrew95 2 4,379 Apr-02-2018, 02:24 PM
Last Post: andrew95
  Designing Hangman game spacetimeguy 2 5,162 Feb-02-2018, 08:55 PM
Last Post: spacetimeguy

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020