




"""simple docstring"""

import colorsys

from PIL import Image  # type: ignore

def 		lowercase_      (		_UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase	):




	"""simple docstring"""






	A_  :				List[Any]	   =		x
	A_  :				Optional[int]	   =		y
	for step in range(_UpperCAmelCase	):  # noqa: B007
		A_  :				Dict	   =		a * a - b * b + x
		A_  :				int	   =		2 * a * b + y
		A_  :				str	   =		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 		lowercase_      (		_UpperCAmelCase	):




	"""simple docstring"""






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

def 		lowercase_      (		_UpperCAmelCase	):




	"""simple docstring"""






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

def 		lowercase_      (		_UpperCAmelCase = 800  ,      _UpperCAmelCase = 600  ,      _UpperCAmelCase = -0.6  ,      _UpperCAmelCase = 0  ,      _UpperCAmelCase = 3.2  ,      _UpperCAmelCase = 50  ,      _UpperCAmelCase = True  ,      ):




	"""simple docstring"""






	A_  :				Dict	   =		Image.new('''RGB'''  ,      (image_width, image_height)	)
	A_  :				Union[str, Any]	   =		img.load()

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

			A_  :				Tuple	   =		get_distance(_UpperCAmelCase  ,      _UpperCAmelCase  ,      _UpperCAmelCase	)

			# color the corresponding pixel based on the selected coloring-function
			if use_distance_color_coding:
				A_  :				Optional[int]	   =		get_color_coded_rgb(_UpperCAmelCase	)
			else:
				A_  :				Union[str, Any]	   =		get_black_and_white_rgb(_UpperCAmelCase	)

	return img


if __name__ == "__main__":
		import doctest

		doctest.testmod()

		# colored version, full figure
		_lowerCamelCase  :			Optional[int]        =       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"""

import requests
from bsa import BeautifulSoup

def 		lowercase_      (		_UpperCAmelCase = "https://www.worldometers.info/coronavirus"	):




	"""simple docstring"""






	A_  :				str	   =		BeautifulSoup(requests.get(_UpperCAmelCase	).text  ,      '''html.parser'''	)
	A_  :				Union[str, Any]	   =		soup.findAll('''h1'''	)
	A_  :				Union[str, Any]	   =		soup.findAll('''div'''  ,      {'''class''': '''maincounter-number'''}	)
	keys += soup.findAll('''span'''  ,      {'''class''': '''panel-title'''}	)
	values += soup.findAll('''div'''  ,      {'''class''': '''number-table-main'''}	)
	return {key.text.strip(): value.text.strip() for key, value in zip(_UpperCAmelCase  ,      _UpperCAmelCase	)}


if __name__ == "__main__":
		print('\033[1m' + 'COVID-19 Status of the World' + '\033[0m\n')
		for key, value in world_covidaa_stats().items():
				print(f'{key}\n{value}\n')





