[Tutor] I don't understand this code

Serdar Tumgoren zstumgoren at gmail.com
Wed Jul 14 13:49:46 CEST 2010


The rest of the list does a great job explaining the situation, which bears
out in the code itself. If you look farther down in the code sample in
Chapter 9, you'll see the function called twice.

http://inventwithpython.com/chapter9/

<< snipped >>
print('H A N G M A N')
missedLetters = ''
correctLetters = ''
secretWord = getRandomWord(words)
gameIsDone = False
<< end snippet >>

And then again a bit below:

<< snippet >>

            gameIsDone = False
            secretWord = getRandomWord(words)
        else:
            break

<< end snippet >>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100714/e1ba3b13/attachment-0001.html>


More information about the Tutor mailing list