
import colorsys

from PIL import Image  # type: ignore


def     __lowerCAmelCase			(			a__						,    a__						,    a__  )       ->  float:
				__a										=    x
				__a										=    y
				for step in range(a__  ):  # noqa: B007
								__a										=    a * a - b * b + x
								__a										=    2 * a * b + y
								__a										=    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     __lowerCAmelCase			(			a__  )       ->  tuple:
				if distance == 1:
								return (0, 0, 0)
				else:
								return (255, 255, 255)


def     __lowerCAmelCase			(			a__  )       ->  tuple:
				if distance == 1:
								return (0, 0, 0)
				else:
								return tuple(round(i * 255  ) for i in colorsys.hsv_to_rgb(a__						,    1						,    1  )  )


def     __lowerCAmelCase			(			a__ = 800						,    a__ = 600						,    a__ = -0.6						,    a__ = 0						,    a__ = 3.2						,    a__ = 50						,    a__ = True						,    )       ->  Image.Image:
				__a										=    Image.new('''RGB'''						,    (image_width, image_height)  )
				__a										=    img.load()

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

												__a										=    get_distance(a__						,    a__						,    a__  )

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

				return img


if __name__ == "__main__":
					import doctest

					doctest.testmod()

					# colored version, full figure
					A     :	Tuple    = 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       _SCREAMING_SNAKE_CASE		(	_lowercase						:    float    ,       _lowercase						:    float					) ->float:






	'''simple docstring'''






	return price * (1 + tax_rate)


if __name__ == "__main__":
		print(F'''{price_plus_tax(100, 0.25) = }''')
		print(F'''{price_plus_tax(125.50, 0.05) = }''')


