





def     a__ (					lowercase__  ):






   '''simple docstring'''






   return "".join([hex(lowercase__  )[2:].zfill(2  ).upper() for byte in list(lowercase__  )]  )




def     a__ (					lowercase__  ):






   '''simple docstring'''






   if (len(lowercase__  ) % 2) != 0:
      raise ValueError(
          "Base16 encoded data is invalid:\nData does not have an even number of hex digits."  )
   # Check the character set - the standard base16 alphabet
   # is uppercase according to RFC3548 section 6
   if not set(lowercase__  ) <= set("0123456789ABCDEF"  ):
      raise ValueError(
          "Base16 encoded data is invalid:\nData is not uppercase hex or it contains invalid characters."  )
   # For every two hexadecimal digits (= a byte), turn it into an integer.
   # Then, string the result together into bytes, and return it.
   return bytes(int(data[i] + data[i + 1]  ,    1_6  ) for i in range(0  ,    len(lowercase__  )  ,    2  )  )


if __name__ == "__main__":
     import doctest

     doctest.testmod()











import sys
import turtle




def     a__ (					lowercase__  ,    lowercase__  ):






   '''simple docstring'''






   return (pa[0] + pa[0]) / 2, (pa[1] + pa[1]) / 2




def     a__ (					lowercase__  ,    lowercase__  ,    lowercase__  ,    lowercase__  ,    ):






   '''simple docstring'''






   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(lowercase__  ,    get_mid(lowercase__  ,    lowercase__  )  ,    get_mid(lowercase__  ,    lowercase__  )  ,    depth - 1  )
   triangle(lowercase__  ,    get_mid(lowercase__  ,    lowercase__  )  ,    get_mid(lowercase__  ,    lowercase__  )  ,    depth - 1  )
   triangle(lowercase__  ,    get_mid(lowercase__  ,    lowercase__  )  ,    get_mid(lowercase__  ,    lowercase__  )  ,    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>"""
          )
     __lowercase  :   Any						      =turtle.Turtle()
     my_pen.ht()
     my_pen.speed(5)
     my_pen.pencolor("""red""")

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




