title: Turtle module crashes when using counter on while loop
body: <pre><code>from turtle import *
  import tkinter
  
  r = 0
  shapes = [shape(&quot;square&quot;), shape(&quot;turtle&quot;), shape(&quot;triangle&quot;)]
  
  def hello():
      while True:
          right(100)
          forward(100)
          left(100)
          r +=1
          
          
  
  hello()
  tkinter.mainloop()
  </code></pre>
  <p>whenever i remove <code>r +=1</code> it works fine. But as soon as I add it, it crashes. The main reason as to why I wanted to use a counter was because originally my code looked like this:</p>
  <pre><code>from turtle import *
  import tkinter
  
  r = 0
  shapes = [shape(&quot;square&quot;), shape(&quot;turtle&quot;), shape(&quot;triangle&quot;)]
  
  def hello():
      while True:
          right(r)
          forward(r)
          left(r)
          r +=1
          
          
  
  hello()
  tkinter.mainloop()
  </code></pre>
  <p>But that makes the program crash even faster, funny enough. Anyone having similar problems?</p>