
import colorsys

from PIL import Image  # type: ignore






def 				UpperCAmelCase_						(				__SCREAMING_SNAKE_CASE					,				__SCREAMING_SNAKE_CASE					,				__SCREAMING_SNAKE_CASE				):
	lowercase	    =       x
	lowercase	    =       y
	for step in range(__SCREAMING_SNAKE_CASE				):  # noqa: B007
		lowercase	    =       a * a - b * b + x
		lowercase	    =       2 * a * b + y
		lowercase	    =       a_new

		# divergence happens for all complex number with an absolute value
		# greater than 4
		if a * a + b * b > 4:
			break
	return step / (max_step - 1)






def 				UpperCAmelCase_						(				__SCREAMING_SNAKE_CASE				):
	if distance == 1:
		return (0, 0, 0)
	else:
		return (255, 255, 255)






def 				UpperCAmelCase_						(				__SCREAMING_SNAKE_CASE				):
	if distance == 1:
		return (0, 0, 0)
	else:
		return tuple(round(i * 255				) for i in colorsys.hsv_to_rgb(__SCREAMING_SNAKE_CASE					,				1					,				1				)				)






def 				UpperCAmelCase_						(				__SCREAMING_SNAKE_CASE = 800					,				__SCREAMING_SNAKE_CASE = 600					,				__SCREAMING_SNAKE_CASE = -0.6					,				__SCREAMING_SNAKE_CASE = 0					,				__SCREAMING_SNAKE_CASE = 3.2					,				__SCREAMING_SNAKE_CASE = 50					,				__SCREAMING_SNAKE_CASE = True					,				):
	lowercase	    =       Image.new('RGB'					,				(image_width, image_height)				)
	lowercase	    =       img.load()

	# loop through the image-coordinates
	for image_x in range(__SCREAMING_SNAKE_CASE				):
		for image_y in range(__SCREAMING_SNAKE_CASE				):
			# determine the figure-coordinates based on the image-coordinates
			lowercase	    =       figure_width / image_width * image_height
			lowercase	    =       figure_center_x + (image_x / image_width - 0.5) * figure_width
			lowercase	    =       figure_center_y + (image_y / image_height - 0.5) * figure_height

			lowercase	    =       get_distance(__SCREAMING_SNAKE_CASE					,				__SCREAMING_SNAKE_CASE					,				__SCREAMING_SNAKE_CASE				)

			# color the corresponding pixel based on the selected coloring-function
			if use_distance_color_coding:
				lowercase	    =       get_color_coded_rgb(__SCREAMING_SNAKE_CASE				)
			else:
				lowercase	    =       get_black_and_white_rgb(__SCREAMING_SNAKE_CASE				)

	return img


if __name__ == "__main__":
	import doctest

	doctest.testmod()

	# colored version, full figure
	UpperCAmelCase       =					get_image()

	# uncomment for colored version, different section, zoomed in
	# img = get_image(figure_center_x = -0.6, figure_center_y = -0.4,
	# figure_width = 0.8)

	# uncomment for black and white version, full figure
	# img = get_image(use_distance_color_coding = False)

	# uncomment to save the image
	# img.save("mandelbrot.png")

	img.show()







'''simple docstring'''







def 						_A      ( ):






   '''simple docstring'''







   A__       =     [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

   A__       =     6
   A__       =     1
   A__       =     1901

   A__       =     0

   while year < 2001:
      day += 7

      if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
         if day > days_per_month[month - 1] and month != 2:
            month += 1
            A__       =     day - days_per_month[month - 2]
         elif day > 29 and month == 2:
            month += 1
            A__       =     day - 29
      else:
         if day > days_per_month[month - 1]:
            month += 1
            A__       =     day - days_per_month[month - 2]

      if month > 12:
         year += 1
         A__       =     1

      if year < 2001 and day == 1:
         sundays += 1
   return sundays


if __name__ == "__main__":
    print(solution())


