Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python hangman help
#5
(Feb-12-2019, 11:39 PM)ichabod801 Wrote: Also note that you are still wiping out previous correct guesses. I would change the blanks[count] on line 131 to temp[count]. That way if they've guessed that letter already it will stay in temp. Also note that temp is growing each turn. I would short circuit that by reinitializing temp to an empty string at the start of update_puzzle_string.

Thank you so much for the help.

I realize that I am wiping out previous correct guesses. I need to stop temp from growing, and from erasing previous correct guesses. For example, if I guess a it should be a____. And then if I guess p, I want app__ returned. And then if I guess q, it should just be app__. Right now if I guess a, I get a____. And then if I guess p, I get a_______pp____ because as the function repeats, the temp keeps getting longer. Any way around this problem?
Reply


Messages In This Thread
Python hangman help - by A1395 - Feb-12-2019, 07:17 PM
RE: Python hangman help - by ichabod801 - Feb-12-2019, 08:49 PM
RE: Python hangman help - by A1395 - Feb-12-2019, 11:05 PM
RE: Python hangman help - by ichabod801 - Feb-12-2019, 11:39 PM
RE: Python hangman help - by A1395 - Feb-13-2019, 12:15 AM
RE: Python hangman help - by ichabod801 - Feb-13-2019, 03:12 AM
RE: Python hangman help - by A1395 - Feb-13-2019, 05:32 AM
RE: Python hangman help - by ichabod801 - Feb-13-2019, 03:23 PM
RE: Python hangman help - by A1395 - Feb-13-2019, 03:41 PM
RE: Python hangman help - by ichabod801 - Feb-13-2019, 03:47 PM
RE: Python hangman help - by A1395 - Feb-13-2019, 04:01 PM
RE: Python hangman help - by ichabod801 - Feb-13-2019, 04:24 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Hangman Game - Multiple Letters Problem t0rn 4 4,769 Jun-05-2020, 11:27 AM
Last Post: t0rn
  Hangman metro17 4 3,057 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,424 Feb-25-2019, 06:29 PM
Last Post: ichabod801
  Hangman 2skywalkers 3 75,973 Oct-19-2018, 01:49 PM
Last Post: ichabod801
  Hangman Help. 2skywalkers 4 4,242 Jun-26-2018, 02:49 AM
Last Post: ichabod801
  Python Hangman Replacing "_" with letters. 2skywalkers 6 12,183 Jun-25-2018, 12:01 PM
Last Post: gruntfutuk
  Simple Hangman Game Issue andrew95 2 4,382 Apr-02-2018, 02:24 PM
Last Post: andrew95
  Designing Hangman game spacetimeguy 2 5,169 Feb-02-2018, 08:55 PM
Last Post: spacetimeguy
  TKinter Hangman Game Bumble 1 20,671 Jul-19-2017, 06:56 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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