






'''simple docstring'''







import math





def 		_UpperCAmelCase   (							__A							:   int      ):
				a_		:  Tuple											=      0
				a_		:  List[Any]											=      0
				while num > 0:
								a_		:  Tuple											=      num % 8
								a_		:  int											=      octal + (remainder * math.floor(math.pow(10						,		__A      )      ))
								counter += 1
								a_		:  Dict											=      math.floor(num / 8      )  # basically /= 8 without remainder if any
								# This formatting removes trailing '.0' from `octal`.
				return f'0o{int(__A      )}'





def 		_UpperCAmelCase   (							):
				print('''\n2 in octal is:'''      )
				print(decimal_to_octal(2      )      )  # = 2
				print('''\n8 in octal is:'''      )
				print(decimal_to_octal(8      )      )  # = 10
				print('''\n65 in octal is:'''      )
				print(decimal_to_octal(65      )      )  # = 101
				print('''\n216 in octal is:'''      )
				print(decimal_to_octal(2_16      )      )  # = 330
				print('''\n512 in octal is:'''      )
				print(decimal_to_octal(5_12      )      )  # = 1000
				print('''\n'''      )


if __name__ == "__main__":
		main()












'''simple docstring'''







def 		_UpperCAmelCase   (							__A							:   str						,		__A							:   str      ):

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

								return "".join(__A      )

				# matching characters
				a_		:  Optional[Any]											=      get_matched_characters(__A						,		__A      )
				a_		:  int											=      get_matched_characters(__A						,		__A      )
				a_		:  Any											=      len(__A      )

				# transposition
				a_		:  List[Any]											=      (
				    len([(ca, ca) for ca, ca in zip(__A						,		__A      ) if ca != ca]      ) // 2
				)

				if not match_count:
								a_		:  Dict											=      0.0
				else:
								a_		:  Optional[int]											=      (
								    1
								    / 3
								    * (
								        match_count / len(__A      )
								        + match_count / len(__A      )
								        + (match_count - transpositions) / match_count
								    )
								)

				# common prefix up to 4 characters
				a_		:  List[str]											=      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'))




