


def        lowerCAmelCase_  (      __lowerCamelCase							,			__lowerCamelCase			):

							# Check if the input is valid
							if not len(__lowerCamelCase			) == len(__lowerCamelCase			) == 3:
														raise ValueError("Please enter a valid equation."			)
							if equationa[0] == equationa[1] == equationa[0] == equationa[1] == 0:
														raise ValueError("Both a & b of two equations can't be zero."			)

							# Extract the coefficients
							__snake_case				,    __snake_case				,    __snake_case	:    Dict											=     equationa
							__snake_case				,    __snake_case				,    __snake_case	:    Optional[Any]											=     equationa

							# Calculate the determinants of the matrices
							__snake_case	:    Union[str, Any]											=     aa * ba - aa * ba
							__snake_case	:    Tuple											=     ca * ba - ca * ba
							__snake_case	:    Optional[int]											=     aa * ca - aa * ca

							# Check if the system of linear equations has a solution (using Cramer's rule)
							if determinant == 0:
														if determinant_x == determinant_y == 0:
																					raise ValueError("Infinite solutions. (Consistent system)"			)
														else:
																					raise ValueError("No solution. (Inconsistent system)"			)
							else:
														if determinant_x == determinant_y == 0:
																					# Trivial solution (Inconsistent system)
																					return (0.0, 0.0)
														else:
																					__snake_case	:    Optional[int]											=     determinant_x / determinant
																					__snake_case	:    int											=     determinant_y / determinant
																					# Non-Trivial Solution (Consistent system)
																					return (x, y)





import math







def        lowerCAmelCase_  (      __lowerCamelCase							,			__lowerCamelCase			):

							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 > 3_6_0:
														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(__lowerCamelCase			)			) ** 2)


if __name__ == "__main__":
			import doctest

			doctest.testmod(name="malus_law")

