# 7b6b42200e782377dfff618c401a483b8cb6adaef443df0adff6c4d3aedaf4d9 Elan 2.0.0-alpha valid

# 
# 
# 
# 
# 
# Elan 1.9.0
main
  variable t set to new Turtle()
  variable paces set to 0
  call t.hide()
  call circle(t, 50)
  for count in range(1, 21)
    call t.placeAt(0, 0)
    variable colour set to randint(red, blue)
    call t.penColour(colour)
    while sqrt(pow(t.x, 2) + pow(t.y, 2)) < 50
      variable angle set to randint(-90, 90)
      call t.turn(angle)
      call t.move(5)
      set paces to paces + 1
    end while
  end for
  call print($"Average number of paces: {paces/20}")
end main

procedure circle(t as Turtle, radius as Int)
  variable segment set to radius*pi*2/360
  call t.placeAt(-radius, 0)
  for count in range(1, 361)
    call t.move(segment)
    call t.turn(1)
  end for
end procedure
