
from PIL import Image




def 							a		(				snake_case__:   Image		,  snake_case__:   int   ):


				'''simple docstring'''
				lowercase_	    =   (259 * (level + 255)) / (255 * (259 - level))

				def contrast(snake_case__:   int   ) -> int:
								return int(128 + factor * (c - 128)   )

				return img.point(snake_case__   )


if __name__ == "__main__":
						# Load image
						with Image.open('image_data/lena.jpg') as img:
												# Change contrast to 170
												__a         =   change_contrast(img, 1_7_0)
												cont_img.save('image_data/lena_high_contrast.png', format='png')






from __future__ import annotations

from math import pi, sqrt




def 							a		(				snake_case__:   float		,  snake_case__:   float   ):


				'''simple docstring'''

				if inductance <= 0:
								raise ValueError('''Inductance cannot be 0 or negative'''   )

				elif capacitance <= 0:
								raise ValueError('''Capacitance cannot be 0 or negative'''   )

				else:
								return (
								    "Resonant frequency",
								    float(1 / (2 * pi * (sqrt(inductance * capacitance   )))   ),
								)


if __name__ == "__main__":
						import doctest

						doctest.testmod()




