Search Result

Collapse
2 results in 0.0024 seconds.
Keywords
Members
Tags
hangman python
  •  

  • St33med
    started a topic Hangman code

    Hangman code

    Making a hangman code (I'm a n00b, still in the tutorial stage)

    Anyway, here's my (top-secret) code:
    Code:
    def guess():
        choice=raw_input("Guess!(lowercase only please!)")
        if len(choice)>1:
            print "Don't cheat!"
            guess()
        elif guess in y:
            b[z.find(choice)]=choice
            print "Good Choice!"
            print ''.join(b)
    ...
    See more | Go to post

  • ilikepython
    started a topic hangman with strings and list methods

    hangman with strings and list methods

    Hi I'm new to Python(3 to 4 days) and I'm working on a hangman game and have been having some problems that really annoy me.
    Here is part of my script:
    Code:
    c = input('Would you like to play hangman? Type y or n ')
            
            
            word = sample(('soccer', 'robbery', 'antibiotics'), 1)
            word = str(word)    
            spaces = len(word) - 4
            def hangman():
    ...
    See more | Go to post
    Last edited by bartonc; Feb 17 '07, 10:18 PM. Reason: added [code][/code] tags
Working...