title: Need help calling function in my hangman game
body: <p>Need help calling function in my python game.</p>
  
  <p>I'm working on my first Python Hangman game using <code>turtle</code>. I just need to figure out a way to call the below function when a user inputs the incorrect character.</p>
  
  <pre><code>def drawHangman(counter):
  
    def drawNoose():
      turtle.speed(10)
      turtle.color("Black")
      turtle.forward(120)
      turtle.forward(-60)
      turtle.left(90)
      turtle.forward(150)
      turtle.right(90)
      turtle.forward(100)
      turtle.right(90)
      turtle.forward(30)
      turtle.right(90)
  
    def drawHead():
      turtle.circle(15)
      turtle.circle(15, 180) # draw a semicircle
      turtle.right(90)
  
    def drawArms():
      turtle.forward(5)
      turtle.left(90)
      turtle.forward(20)
      turtle.forward(-40)
      turtle.forward(20)
      turtle.right(90)
  
    def drawTorso():
      turtle.forward(30)
  
    def drawLegs():
      turtle.left(45)
      turtle.forward(30)
      turtle.forward(-30)
      turtle.right(90)
      turtle.forward(30)
      turtle.forward(-30)
      turtle.left(45)
  
    if counter==0:
      drawNoose()
    elif counter==1:
      drawNoose()
      drawHead()
    elif counte)
    elif counter==4:
      drawLegs()r==2:
      drawArms()
    elif counter==3:
      drawTorso)
    elif counter==4:
      drawLegs()()
    elif counter==4:
      drawLegs()
  </code></pre>
  
  <p>Does anyone have any idea how I can go about doing this?</p>
  
  <p>My code is below:</p>
  
  <pre><code>guesses = ''
  
  turns = 6
  
  while turns &gt; 0:
  
  
      failed = 0
  
  
      for char in word:
  
  
          if char in guesses:
              print(char)
  
          else:
              print("_")
  
  
  
              failed +=1
  
  
  
      if failed == 0:
  
          print("You Win")
  
  
          print("The word is: ", word)
          break
  
  
      guess = input("guess a character:")
  
  
      guesses += guess
  
  
      if guess not in word:
  
          turns -= 1
  
  
          print("Wrong")
  
  
  
  
  
          print("You have", + turns, 'more guesses')
  
          if turns == 0:
              print("You Loose")
  </code></pre>