Skip to main content

Timeline for First Hangman game

Current License: CC BY-SA 3.0

3 events
when toggle format what by license comment
Dec 11, 2014 at 15:19 comment added Amateur Programer @user192881 If you put it in a while loop, you can just have the variable (Which must be a list for .append to work) be equal to blank, so when the game resets so does the list. Make sure it is not in the actual definitions but outside the definitions because when you get a correct letter, it resets the letter. Also, in the def Guess, do not put the list there, but add the letter there, and add another statement to make sure the user does not guess the same letter. Add the letter at the end of the definition.
Dec 10, 2014 at 21:20 comment added ngngngn Thanks, I just made a way to do that yesterday. I used create_hangman.already_guessed = "" then did create_hangman.already_guessed = create_hangman.already_guessed, letter which clearly is the wrong way for me to do that now that I read these posts. Here's the thing I can't find a way to access the GuessedLetters to do .append on it. How do I access variables that were created in a function? I used create_hangman.guessed_letters as a fix for that. Another better way?
Dec 10, 2014 at 14:11 history answered Amateur Programer CC BY-SA 3.0