Terarecon 0 Newbie Poster

Heres what i have so far:

ver = 0.01
#import the random library of functions\commands
import random
global guess

#function to check players guess
def checkGuess():
    turns = 5
    n = 0
    guess = input('Please guess a letter:')
    guesslen = len(guess)
    while len(guess) > n:
        if guesslen >1:
            print ('Please only guess a single letter.')
            checkGuess()
        elif guess in secretWord:
            print (guess)
            n = n+1
            checkGuess()
        elif guess not in secret:
            turns -= 1
            print ('Nope.')
            print (turns), 'more turns'
            if turns < 5: print ('        OMMMMMD')
            if turns < 5: print ('       MMMMMMMMM')
            if turns < 5: print ('      =MMMMMMMMM?')
            if turns < 5: print ('      ,MMMMMMMMM:')
            if turns < 5: print ('       MMMMMMMMM')
            if turns < 5: print ('        .MMMMM,')
            if turns < 5: print ('                       ')
            if turns < 3: print ('  ZMMMMMMMMMMMMMMMMM7L')
            if turns < 3: print (' MMMMMMMMMMMMMMMMMMMMM')
            if turns < 3: print ('MMMMMMMMMMMMMMMMMMMMMMM')
            if turns < 3: print ('MMMMMMMMMMMMMMMMMMMMMMM')
            if turns < 3: print ('MMMMIMMMMMMMMMMMMMIMMMM')
            if turns < 3: print ('MMMM DMMMMMMMMMMMM MMMM')
            if turns < 3: print ('MMMM DMMMMMMMMMMMM MMMM')
            if turns < 3: print ('MMMM DMMMMMMMMMMMM MMMM')
            if turns < 3: print ('MMMM DMMMMMMMMMMMM MMMM')
            if turns < 3: print ('MMMM DMMMMMMMMMMMM MMMM')
            if turns < 3: print ('MMMM DMMMMMMMMMMMM MMMM')
            if turns < 3: print ('MMMM DMMMMMMMMMMMM MMMM')
            if turns < 3: print ('MMMM DMMMMMMMMMMMM MMMM')
            if turns < 3: print ('MMMM DMMMMMMMMMMMM MMMM')
            if turns < 3: print (' ZD  DMMMMM?MMMMMM  DO')
            if turns < 2: print ('     DMMMMM MMMMMM')
            if turns < 2: print ('     DMMMMM MMMMMM')
            if turns < 2: print ('     DMMMMM MMMMMM')
            if turns < 2: print ('     DMMMMM MMMMMM')
            if turns < 2: print ('     DMMMMM MMMMMM')
            if turns < 2: print ('     DMMMMM MMMMMM')
            if turns < 2: print ('     DMMMMM MMMMMM')
            if turns < 2: print ('     DMMMMM MMMMMM')
            if turns < 1: print ('     DMMMMM MMMMMM')
            if turns < 1: print ('     DMMMMM MMMMMM')
            if turns < 1: print ('     DMMMMM MMMMMM')
            if turns < 1: print ('     DMMMMM MMMMMM')
            if turns < 1: print ('     DMMMMM MMMMMM')
            if turns < 1: print ('      MMMM+ ?MMMM')
            if turns == 0:
            print ('The answer is'), (secretWord)



#THE MAIN PROGRAM
print('H A N G M A N')
secretWord = random.choice([
    'crocodile',
    'elephant',
    'penguin',
    'pelican',
    'leopard',
    'hamster',
    'lion',
])
i = (' ')
print(secretWord)
lengvariable = len(secretWord)
length = 0
while lengvariable > length:
    i = i + (' _')
    length = length + 1
print(i)
guess = ('')
checkGuess()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.