


'''simple docstring'''
def 			_lowercase       (				UpperCamelCase__       :					list[int],				UpperCamelCase__       :					list[int]			):



	if not len(UpperCamelCase__			) == len(UpperCamelCase__			) == 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
	__A  :		Optional[int]       =			equationa
	__A  :		Tuple       =			equationa

	# Calculate the determinants of the matrices
	__A  :		Dict       =			aa * ba - aa * ba
	__A  :		str       =			ca * ba - ca * ba
	__A  :		Union[str, Any]       =			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:
			__A  :		List[str]       =			determinant_x / determinant
			__A  :		List[Any]       =			determinant_y / determinant
			# Non-Trivial Solution (Consistent system)
			return (x, y)










'''simple docstring'''
from collections.abc import Sequence


def 			_lowercase       (				UpperCamelCase__       :					Sequence[float],				UpperCamelCase__       :					float			):
 return sum(c * (x**i) for i, c in enumerate(UpperCamelCase__			)			)


def 			_lowercase       (				UpperCamelCase__       :					Sequence[float],				UpperCamelCase__       :					float			):
 __A  :		Optional[Any]       =			0.0
 for coeff in reversed(UpperCamelCase__			):
  __A  :		List[str]       =			result * x + coeff
 return result


if __name__ == "__main__":
 UpperCAmelCase_ :     Any								=      (0.0, 0.0, 5.0, 9.3, 7.0)
 UpperCAmelCase_ :     Any								=      10.0
 print(evaluate_poly(poly, x))
 print(horner(poly, x))






