
import sys
import turtle


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


def      UpperCamelCase   (       __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>"""
      )
   __lowerCamelCase				=			turtle.Turtle()
   my_pen.ht()
   my_pen.speed(5)
   my_pen.pencolor("""red""")

   __lowerCamelCase				=			[(-1_75, -1_25), (0, 1_75), (1_75, -1_25)]  # vertices of triangle
   triangle(vertices[0], vertices[1], vertices[2], int(sys.argv[1]))







def      UpperCamelCase   (       __lowerCamelCase	:					int = 1							,   __lowerCamelCase	:					int = 1000       ):
       snake_case			:  int     							= 1
       snake_case			:  int     							= 0

       for divide_by_number in range(__lowerCamelCase							,   digit + 1       ):
              snake_case			:  list[int]     							= []
              snake_case			:  Optional[int]     							= numerator
              for _ in range(1							,   digit + 1       ):
                     if now_divide in has_been_divided:
                            if longest_list_length < len(__lowerCamelCase       ):
                                   snake_case			:  List[Any]     							= len(__lowerCamelCase       )
                                   snake_case			:  List[str]     							= divide_by_number
                     else:
                            has_been_divided.append(__lowerCamelCase       )
                            snake_case			:  Any     							= now_divide * 10 % divide_by_number

       return the_digit


# Tests
if __name__ == "__main__":
   import doctest

   doctest.testmod()





