"""simple docstring"""






from __future__ import annotations




def 						SCREAMING_SNAKE_CASE					(  __UpperCAmelCase  ,					__UpperCAmelCase  ,					__UpperCAmelCase       )							->   int | float:
				if len(__UpperCAmelCase       ) == 0:
								raise ValueError("find_max() arg is an empty sequence"       )
				if (
				    left >= len(__UpperCAmelCase       )
				    or left < -len(__UpperCAmelCase       )
				    or right >= len(__UpperCAmelCase       )
				    or right < -len(__UpperCAmelCase       )
				):
								raise IndexError("list index out of range"       )
				if left == right:
								return nums[left]
				SCREAMING_SNAKE_CASE__		  =				(left + right) >> 1  # the middle
				SCREAMING_SNAKE_CASE__		  =				find_max(__UpperCAmelCase  ,					__UpperCAmelCase  ,					__UpperCAmelCase       )  # find max in range[left, mid]
				SCREAMING_SNAKE_CASE__		  =				find_max(__UpperCAmelCase  ,					mid + 1  ,					__UpperCAmelCase       )  # find max in range[mid + 1, right]

				return left_max if left_max >= right_max else right_max


if __name__ == "__main__":
						import doctest

						doctest.testmod(verbose=True)





"""simple docstring"""






import math




def 						SCREAMING_SNAKE_CASE					(  __UpperCAmelCase  ,					__UpperCAmelCase       )							->   float:

				if initial_intensity < 0:
								raise ValueError("The value of intensity cannot be negative"       )
								# handling of negative values of initial intensity
				if angle < 0 or angle > 360:
								raise ValueError("In Malus Law, the angle is in the range 0-360 degrees"       )
								# handling of values out of allowed range
				return initial_intensity * (math.cos(math.radians(__UpperCAmelCase       )       ) ** 2)


if __name__ == "__main__":
						import doctest

						doctest.testmod(name='malus_law')




