import sys
import turtle





def    __lowercase     (						lowerCamelCase					:     tuple[float, float]  ,  lowerCamelCase					:     tuple[float, float]	):
 return (pa[0] + pa[0]) / 2, (pa[1] + pa[1]) / 2





def    __lowercase     (						lowerCamelCase					:     tuple[float, float]  ,  lowerCamelCase					:     tuple[float, float]  ,  lowerCamelCase					:     tuple[float, float]  ,  lowerCamelCase					:     int  ,  ):
 my_pen.up()
 my_pen.goto(vertexa[0]  ,  vertexa[1]	)
 my_pen.down()
 my_pen.goto(vertexa[0]  ,  vertexa[1]	)
 my_pen.goto(vertexa[0]  ,  vertexa[1]	)
 my_pen.goto(vertexa[0]  ,  vertexa[1]	)

 if depth == 0:
  return

 triangle(lowerCamelCase  ,  get_mid(lowerCamelCase  ,  lowerCamelCase	)  ,  get_mid(lowerCamelCase  ,  lowerCamelCase	)  ,  depth - 1	)
 triangle(lowerCamelCase  ,  get_mid(lowerCamelCase  ,  lowerCamelCase	)  ,  get_mid(lowerCamelCase  ,  lowerCamelCase	)  ,  depth - 1	)
 triangle(lowerCamelCase  ,  get_mid(lowerCamelCase  ,  lowerCamelCase	)  ,  get_mid(lowerCamelCase  ,  lowerCamelCase	)  ,  depth - 1	)


if __name__ == "__main__":
   if len(sys.argv) != 2:
      raise ValueError(
          'Correct format for using this script: '
          'python fractals.py <int:depth_for_fractal>'
      )
   a_    					=       turtle.Turtle()
   my_pen.ht()
   my_pen.speed(5)
   my_pen.pencolor('red')

   a_    					=       [(-175, -125), (0, 175), (175, -125)]  # vertices of triangle
   triangle(vertices[0], vertices[1], vertices[2], int(sys.argv[1]))




from __future__ import annotations





def    __lowercase     (						lowerCamelCase					:     Optional[Any]  ,  lowerCamelCase					:     Dict  ,  lowerCamelCase					:     Union[str, Any]  ,  lowerCamelCase					:     List[str]	):  # noqa: E741
 while r - l > 1:
  UpperCamelCase_					:						Union[str, Any] =					(l + r) // 2
  if v[m] >= key:
   UpperCamelCase_					:						str =					m
  else:
   UpperCamelCase_					:						List[Any] =					m  # noqa: E741
 return r





def    __lowercase     (						lowerCamelCase					:     list[int]	):
 if len(lowerCamelCase	) == 0:
  return 0

 UpperCamelCase_					:						Tuple =					[0] * len(lowerCamelCase	)
 UpperCamelCase_					:						int =					1

 UpperCamelCase_					:						Dict =					v[0]

 for i in range(1  ,  len(lowerCamelCase	)	):
  if v[i] < tail[0]:
   UpperCamelCase_					:						Any =					v[i]
  elif v[i] > tail[length - 1]:
   UpperCamelCase_					:						Dict =					v[i]
   length += 1
  else:
   UpperCamelCase_					:						List[str] =					v[i]

 return length


if __name__ == "__main__":
   import doctest

   doctest.testmod()



