title: How to indicate which turtle won the race
body: <p>I have a simple turtle racing game. I am trying to add code to declare/display which of four turtles won the race when a turtle reaches the finish line (x position 190). But I get errors. Could you please explain how I might modify this code so that it works?</p>
  
  <pre><code>    from turtle import *
      from random import randint
      tur1=Turtle()
      tur1.color("red")
      tur1.shape("turtle")
      tur1.penup()
      tur1.goto(-155,100)
      tur1.pendown()
  
      tur2=Turtle()
      tur2.color("blue")
      tur2.shape("turtle")
      tur2.penup()
      tur2.goto(-155,70)
      tur2.pendown()
  
      tur3=Turtle()
      tur3.color("green")
      tur3.shape("turtle")
      tur3.penup()
      tur3.goto(-155,40)
      tur3.pendown()
      tur4=Turtle()
      tur4.color("yellow")
      tur4.shape("turtle")
      tur4.penup()
      tur4.goto(-155,10)
      tur4.pendown()
      """if tur[i]==190(x value): 
        finish_text.write( tur[i] won the race)
      Here I use a for loop to name the winner turtle..tur[i]"""
  
      for turn in range(102):
          for i in range(4):       "not sure how to set code this part 
          tur[1].forward(randint(1,5))
          tur[2].forward(randint(1,5))
          tur[3].forward(randint(1,5))
          tur[4].forward(randint(1,5))
  
      import turtle
      wn=turtle.Screen()
      wn.bgcolor("black")
      finish=turtle.Turtle()
      finish.up()
      finish.speed(0)
      finish.goto(190,140)
      finish.down()
      finish.right(90)
      finish.width(3)
  
      for i in range(16):
          finish.color("blue")
          finish.forward(5)
          finish.color("red")
          finish.forward(5)
  
      finish_text=Turtle()
      finish_text.up()
      finish_text.speed(10)
      finish_text.color("white")
      finish_text.goto(160,150)
      finish_text.write("Finishing-Line",font=("Times New Roman",12,"bold"))
  
      finish_text.goto(160,250)
      "Here I am tring to announce which turtle won the race"
      finish_text.write("turtle[i] won the race")
  
  
      wn.mainloop()
  </code></pre>