Can someone do a professional pytho hangman?
I had started a month ago, and i did a bunch version, but is not my teacher want. Now my teacher want my hangman program to have a clues for the word! I was like #!@%$ (My class just a beginner and i have less than a week to finish)
I'm tired of doing and is getting more confused and confusing to me, but i got to do it.

So i come up a idea for my program is let user selected a category then message the clues for each category. The problem is i don't how.

This what i have done:

    import random
    import os
    
    
    keep_playing = True
    category = ""
    animals=["horse","donkey","dinosaur","monkey","cat","alligator","butterfly","buffalo","dragon"]
    games_name = ["Fill in later"]
    music_name = [""]
                     
    
    def print_game_rules(max_incorrect,word_len):
        print"You have only 7 chances to guess the right answer"
        return
    def word_chocie():          # This my new function for category and my word list above.
    	while keep_playing == True:        #I don't had error at this part.
    		print """Please select a category setting
    		1 - Animals
    		2 - Name of game
    		3 - Name of music
    		"""
    		z = str(raw_input("Category Choice: "))
    		if z == "1":
    			category = "animals"
    			print "You have selected Animals."
    			print "Hint: "
    			break
    		if z == "2":
    			category = "games_name"
    			print "You have selected Name of game."
    			print "Hint: Game of 2010"
    			break
    		if z == "3":
    			category = "music_name"
    			print "You have selected Name of music."
    			print "Hint: Music of K-pop"
    			break
    		else:
    			print "That is not a valid selection"
    	if difficulty <> "":
    		del z
    	return
    	
    def pick_word():                    #i was thinking should something look like this
    	while keep_playing == True:
    		if keep_playing:
    			if category == "animals":    #i don't what code go to put
    				
    			elif category == "games_name":   #same
    				
    			elif category == "music_name":   #same
    				
    			else:
    				print "error"
    				return
    
    def get_letter():
        print
        letter = raw_input("Guess a letter in the mystery word:") 
        letter = letter.strip()
        letter = letter.lower()
        print
        os.system('cls')
        return letter
    def display_figure(hangman):          #Too much figure & not important
        graphics = [
        """
             +-------+
             |
             |
             |
             |
             |
             |
         ====================
        """]
    
        print graphics[hangman]
        return
    
    while keep_playing:
        word=word_chocie()      #|  i know is get to do something of these 3
        ran_word=pick_word()    #|- because every time i had add some thing is going to say
        word_len=len(ran_word)  #|  global name not defind or object of type 'NoneType' has no len
        guesses=word_len * ['_']
        max_incorrect=7
        alphabet="abcdefghijklmnopqrstuvxyz"
        letters_tried=""
        number_guesses=0
        letters_correct=0
        incorrect_guesses=0
        print_game_rules(max_incorrect,word_len)
    
    
        while (incorrect_guesses != max_incorrect) and (letters_correct != word_len):
            letter=get_letter()
            display_figure(incorrect_guesses)
            if len(letter)==1 and letter.isalpha():
                if letters_tried.find(letter) != -1:
                    print "You already picked", letter
                else:
                    letters_tried = letters_tried + letter
                    first_index=word.find(letter)
                    if  first_index == -1:
                        incorrect_guesses= incorrect_guesses +1
                        print "The",letter,"is not the mystery word."
                    else:
                        print"The",letter,"is in the mystery word."
                        letters_correct=letters_correct+1
                        for i in range(word_len):
                            if letter == word[i]:
                                guesses[i] = letter
    
            else:
                print "Please guess a single letter in the alphabet."
            
            print ' '.join(guesses)
            print "Letters tried so far: ", letters_tried
            if incorrect_guesses == max_incorrect:
                print "Sorry, too many incorrect guesses. You are hanged."
                print "The word was",word
                keep_playing = False
            if letters_correct == word_len:
                print "You guessed all the letters in the word!"
                print "The word was",word
                keep_playing = False
            
            
        if keep_playing == False:
            user = raw_input("\n\tShall we play another game? [y|n] ")
            again = "yes".startswith(user.strip().lower())
            if again:
                keep_playing = True
            else:
                break
    
    raw_input ("\n\n\nPress enter to exit")

I really had tried so hard and my best. I'm so hate my self why still didn't done in a month!
Can someone do a professional pytho hangman?
===

I had started a month ago, and i did a bunch version, but is not my teacher want. Now my teacher want my hangman program to have a clues for the word! I was like #!@%$ (My class just a beginner and i have less than a week to finish)
I'm tired of doing and is getting more confused and confusing to me, but i got to do it.

So i come up a idea for my program is let user selected a category then message the clues for each category. The problem is i don't how.

This what i have done:

    import random
    import os
    
    
    keep_playing = True
    category = ""
    animals=["horse","donkey","dinosaur","monkey","cat","alligator","butterfly","buffalo","dragon"]
    games_name = ["Fill in later"]
    music_name = [""]
                     
    
    def print_game_rules(max_incorrect,word_len):
        print"You have only 7 chances to guess the right answer"
        return
    def word_chocie():          # This my new function for category and my word list above.
    	while keep_playing == True:        #I don't had error at this part.
    		print """Please select a category setting
    		1 - Animals
    		2 - Name of game
    		3 - Name of music
    		"""
    		z = str(raw_input("Category Choice: "))
    		if z == "1":
    			category = "animals"
    			print "You have selected Animals."
    			print "Hint: "
    			break
    		if z == "2":
    			category = "games_name"
    			print "You have selected Name of game."
    			print "Hint: Game of 2010"
    			break
    		if z == "3":
    			category = "music_name"
    			print "You have selected Name of music."
    			print "Hint: Music of K-pop"
    			break
    		else:
    			print "That is not a valid selection"
    	if difficulty <> "":
    		del z
    	return
    	
    def pick_word():                    #i was thinking should something look like this
    	while keep_playing == True:
    		if keep_playing:
    			if category == "animals":    #i don't what code go to put
    				
    			elif category == "games_name":   #same
    				
    			elif category == "music_name":   #same
    				
    			else:
    				print "error"
    				return
    
    def get_letter():
        print
        letter = raw_input("Guess a letter in the mystery word:") 
        letter = letter.strip()
        letter = letter.lower()
        print
        os.system('cls')
        return letter
    def display_figure(hangman):          #Too much figure & not important
        graphics = [
        """
             +-------+
             |
             |
             |
             |
             |
             |
         ====================
        """]
    
        print graphics[hangman]
        return
    
    while keep_playing:
        word=word_chocie()      #|  i know is get to do something of these 3
        ran_word=pick_word()    #|- because every time i had add some thing is going to say
        word_len=len(ran_word)  #|  global name not defind or object of type 'NoneType' has no len
        guesses=word_len * ['_']
        max_incorrect=7
        alphabet="abcdefghijklmnopqrstuvxyz"
        letters_tried=""
        number_guesses=0
        letters_correct=0
        incorrect_guesses=0
        print_game_rules(max_incorrect,word_len)
    
    
        while (incorrect_guesses != max_incorrect) and (letters_correct != word_len):
            letter=get_letter()
            display_figure(incorrect_guesses)
            if len(letter)==1 and letter.isalpha():
                if letters_tried.find(letter) != -1:
                    print "You already picked", letter
                else:
                    letters_tried = letters_tried + letter
                    first_index=word.find(letter)
                    if  first_index == -1:
                        incorrect_guesses= incorrect_guesses +1
                        print "The",letter,"is not the mystery word."
                    else:
                        print"The",letter,"is in the mystery word."
                        letters_correct=letters_correct+1
                        for i in range(word_len):
                            if letter == word[i]:
                                guesses[i] = letter
    
            else:
                print "Please guess a single letter in the alphabet."
            
            print ' '.join(guesses)
            print "Letters tried so far: ", letters_tried
            if incorrect_guesses == max_incorrect:
                print "Sorry, too many incorrect guesses. You are hanged."
                print "The word was",word
                keep_playing = False
            if letters_correct == word_len:
                print "You guessed all the letters in the word!"
                print "The word was",word
                keep_playing = False
            
            
        if keep_playing == False:
            user = raw_input("\n\tShall we play another game? [y|n] ")
            again = "yes".startswith(user.strip().lower())
            if again:
                keep_playing = True
            else:
                break
    
    raw_input ("\n\n\nPress enter to exit")

I really had tried so hard and my best. I'm so hate my self why still didn't done in a month!