


from timeit import timeit
def 				UpperCAmelCase_					(							__snake_case						)     ->			int:







 """simple docstring"""


 if number < 0:
  raise ValueError('''the value of input must not be negative'''						)
 _lowercase							      =0
 while number:
  number &= number - 1
  result += 1
 return result
def 				UpperCAmelCase_					(							__snake_case						)     ->			int:







 """simple docstring"""


 if number < 0:
  raise ValueError('''the value of input must not be negative'''						)
 _lowercase							      =0
 while number:
  if number % 2 == 1:
   result += 1
  number >>= 1
 return result
def 				UpperCAmelCase_					(							)     ->			None:







 """simple docstring"""


 def do_benchmark(__snake_case						) -> None:
  _lowercase							      ='''import __main__ as z'''
  print(F"Benchmark when {number = }:"						)
  print(F"{get_set_bits_count_using_modulo_operator(__snake_case						) = }"						)
  _lowercase							      =timeit('''z.get_set_bits_count_using_modulo_operator(25)'''     ,						setup=__snake_case						)
  print(F"timeit() runs in {timing} seconds"						)
  print(F"{get_set_bits_count_using_brian_kernighans_algorithm(__snake_case						) = }"						)
  _lowercase							      =timeit(
      '''z.get_set_bits_count_using_brian_kernighans_algorithm(25)'''     ,						setup=__snake_case     ,						)
  print(F"timeit() runs in {timing} seconds"						)

 for number in (25, 37, 58, 0):
  do_benchmark(__snake_case						)
  print()


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  benchmark()





UpperCAmelCase__   	=							{
    '''A''': '''.-''', '''B''': '''-...''', '''C''': '''-.-.''', '''D''': '''-..''', '''E''': '''.''', '''F''': '''..-.''', '''G''': '''--.''',
    '''H''': '''....''', '''I''': '''..''', '''J''': '''.---''', '''K''': '''-.-''', '''L''': '''.-..''', '''M''': '''--''', '''N''': '''-.''',
    '''O''': '''---''', '''P''': '''.--.''', '''Q''': '''--.-''', '''R''': '''.-.''', '''S''': '''...''', '''T''': '''-''', '''U''': '''..-''',
    '''V''': '''...-''', '''W''': '''.--''', '''X''': '''-..-''', '''Y''': '''-.--''', '''Z''': '''--..''', '''1''': '''.----''',
    '''2''': '''..---''', '''3''': '''...--''', '''4''': '''....-''', '''5''': '''.....''', '''6''': '''-....''', '''7''': '''--...''',
    '''8''': '''---..''', '''9''': '''----.''', '''0''': '''-----''', '''&''': '''.-...''', '''@''': '''.--.-.''',
    ''':''': '''---...''', ''',''': '''--..--''', '''.''': '''.-.-.-''', '''\'''': '''.----.''', '''"''': '''.-..-.''',
    '''?''': '''..--..''', '''/''': '''-..-.''', '''=''': '''-...-''', '''+''': '''.-.-.''', '''-''': '''-....-''',
    '''(''': '''-.--.''', ''')''': '''-.--.-''', '''!''': '''-.-.--''', ''' ''': '''/'''
}  # Exclamation mark is not in ITU-R recommendation
# fmt: on
UpperCAmelCase__   	=							{value: key for key, value in MORSE_CODE_DICT.items()}
def 				UpperCAmelCase_					(							__snake_case						)     ->			str:







 """simple docstring"""


 return " ".join(MORSE_CODE_DICT[char] for char in message.upper()						)
def 				UpperCAmelCase_					(							__snake_case						)     ->			str:







 """simple docstring"""


 return "".join(REVERSE_DICT[char] for char in message.split()						)
def 				UpperCAmelCase_					(							)     ->			None:







 """simple docstring"""


 _lowercase							      ='''Morse code here!'''
 print(__snake_case						)
 _lowercase							      =encrypt(__snake_case						)
 print(__snake_case						)
 _lowercase							      =decrypt(__snake_case						)
 print(__snake_case						)


if __name__ == "__main__":
  main()

