
'''simple docstring'''







def 			_a		(	_SCREAMING_SNAKE_CASE		:   str	,			_SCREAMING_SNAKE_CASE		:   str  ):

						def get_matched_characters(_SCREAMING_SNAKE_CASE		:   str	,			_SCREAMING_SNAKE_CASE		:   str  ) -> str:
												_SCREAMING_SNAKE_CASE				= []
												_SCREAMING_SNAKE_CASE				= min(len(_stra  )	,			len(_stra  )  ) // 2
												for i, l in enumerate(_stra  ):
																		_SCREAMING_SNAKE_CASE				= int(max(0	,			i - limit  )  )
																		_SCREAMING_SNAKE_CASE				= int(min(i + limit + 1	,			len(_stra  )  )  )
																		if l in _stra[left:right]:
																								matched.append(_SCREAMING_SNAKE_CASE  )
																								_SCREAMING_SNAKE_CASE				= F'{_stra[0:_stra.index(_SCREAMING_SNAKE_CASE  )]} {_stra[_stra.index(_SCREAMING_SNAKE_CASE  ) + 1:]}'

												return "".join(_SCREAMING_SNAKE_CASE  )

						# matching characters
						_SCREAMING_SNAKE_CASE				= get_matched_characters(_SCREAMING_SNAKE_CASE	,			_SCREAMING_SNAKE_CASE  )
						_SCREAMING_SNAKE_CASE				= get_matched_characters(_SCREAMING_SNAKE_CASE	,			_SCREAMING_SNAKE_CASE  )
						_SCREAMING_SNAKE_CASE				= len(_SCREAMING_SNAKE_CASE  )

						# transposition
						_SCREAMING_SNAKE_CASE				= (
						    len([(ca, ca) for ca, ca in zip(_SCREAMING_SNAKE_CASE	,			_SCREAMING_SNAKE_CASE  ) if ca != ca]  ) // 2
						)

						if not match_count:
												_SCREAMING_SNAKE_CASE				= 0.0
						else:
												_SCREAMING_SNAKE_CASE				= (
												    1
												    / 3
												    * (
												        match_count / len(_SCREAMING_SNAKE_CASE  )
												        + match_count / len(_SCREAMING_SNAKE_CASE  )
												        + (match_count - transpositions) / match_count
												    )
												)

						# common prefix up to 4 characters
						_SCREAMING_SNAKE_CASE				= 0
						for ca, ca in zip(stra[:4]	,			stra[:4]  ):
												if ca == ca:
																		prefix_len += 1
												else:
																		break

						return jaro + 0.1 * prefix_len * (1 - jaro)


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						print(jaro_winkler("""hello""", """world"""))

'''simple docstring'''







def 			_a		(	_SCREAMING_SNAKE_CASE		:   list[int]	,			_SCREAMING_SNAKE_CASE		:   list[int]  ):

						# Check if the input is valid
						if not len(_SCREAMING_SNAKE_CASE  ) == len(_SCREAMING_SNAKE_CASE  ) == 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
						_SCREAMING_SNAKE_CASE,							_SCREAMING_SNAKE_CASE,							_SCREAMING_SNAKE_CASE				= equationa
						_SCREAMING_SNAKE_CASE,							_SCREAMING_SNAKE_CASE,							_SCREAMING_SNAKE_CASE				= equationa

						# Calculate the determinants of the matrices
						_SCREAMING_SNAKE_CASE				= aa * ba - aa * ba
						_SCREAMING_SNAKE_CASE				= ca * ba - ca * ba
						_SCREAMING_SNAKE_CASE				= 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:
																		_SCREAMING_SNAKE_CASE				= determinant_x / determinant
																		_SCREAMING_SNAKE_CASE				= determinant_y / determinant
																		# Non-Trivial Solution (Consistent system)
																		return (x, y)