





def    A				(							UpperCAmelCase  ,  UpperCAmelCase				):
					return number | (1 << position)







def    A				(							UpperCAmelCase  ,  UpperCAmelCase				):
					return number & ~(1 << position)







def    A				(							UpperCAmelCase  ,  UpperCAmelCase				):
					return number ^ (1 << position)







def    A				(							UpperCAmelCase  ,  UpperCAmelCase				):
					return ((number >> position) & 1) == 1







def    A				(							UpperCAmelCase  ,  UpperCAmelCase				):
					return int((number & (1 << position)) != 0				)


if __name__ == "__main__":
							import doctest

							doctest.testmod()






import sys
import turtle







def    A				(							UpperCAmelCase  ,  UpperCAmelCase				):
					return (pa[0] + pa[0]) / 2, (pa[1] + pa[1]) / 2







def    A				(							UpperCAmelCase  ,  UpperCAmelCase  ,  UpperCAmelCase  ,  UpperCAmelCase  ,  ):
					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(UpperCAmelCase  ,  get_mid(UpperCAmelCase  ,  UpperCAmelCase				)  ,  get_mid(UpperCAmelCase  ,  UpperCAmelCase				)  ,  depth - 1				)
					triangle(UpperCAmelCase  ,  get_mid(UpperCAmelCase  ,  UpperCAmelCase				)  ,  get_mid(UpperCAmelCase  ,  UpperCAmelCase				)  ,  depth - 1				)
					triangle(UpperCAmelCase  ,  get_mid(UpperCAmelCase  ,  UpperCAmelCase				)  ,  get_mid(UpperCAmelCase  ,  UpperCAmelCase				)  ,  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 :Any     =    turtle.Turtle()
							my_pen.ht()
							my_pen.speed(5)
							my_pen.pencolor('red')

							__lowerCAmelCase :Optional[int]     =    [(-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]))