prev next 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

Making it Look Like Hangman

It will be more fun if we make our game look like Hangman.

All we need to do is print parts of the poor hangman person when there is a wrong guess. Try adding something like this to the wrong guess part:

...
    print 'Nope.'
    print turns, 'more turns'
    if turns < 5: print '   O   '
    if turns < 4: print ' \_|_/ '
    if turns < 3: print '   |   '
    if turns < 2: print '  / \  '
    if turns < 1: print ' d   b '
    if turns == 0:
      print 'The answer is', secret

You can try drawing your own person with punctuation symbols like this.