



def 							A			(  _UpperCAmelCase       :     str							,     _UpperCAmelCase       :     str					)       ->				float:







			'''simple docstring'''

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

						return "".join(_UpperCAmelCase					)

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

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

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

			# common prefix up to 4 characters
			_UpperCAmelCase	 =     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"))





def 							A			(  _UpperCAmelCase       :     int							,     _UpperCAmelCase       :     int					)       ->				str:







			'''simple docstring'''
			if a < 0 or b < 0:
						raise ValueError('the value of both inputs must be positive'					)

			_UpperCAmelCase	 =     str(bin(_UpperCAmelCase					)					)[2:]  # remove the leading "0b"
			_UpperCAmelCase	 =     str(bin(_UpperCAmelCase					)					)[2:]  # remove the leading "0b"

			_UpperCAmelCase	 =     max(len(_UpperCAmelCase					)							,     len(_UpperCAmelCase					)					)

			return "0b" + "".join(
			    str(int(char_a != char_b					)					)
			    for char_a, char_b in zip(a_binary.zfill(_UpperCAmelCase					)							,     b_binary.zfill(_UpperCAmelCase					)					)					)


if __name__ == "__main__":
							import doctest

							doctest.testmod()
