'''simple docstring'''




def      _UpperCAmelCase    (							_UpperCamelCase    :	str   )	->      str:
    A_     =   word.upper()
    A_     =   0
    A_     =   {}
    A_     =   []

    for letter in word:
        if letter not in letter_nums:
            A_     =   str(_UpperCamelCase   )
            next_num += 1
        word_pattern.append(letter_nums[letter]   )
    return ".".join(_UpperCamelCase   )


if __name__ == "__main__":
  import pprint
  import time

  __snake_case   :      Tuple						    =  time.time()
  with open('dictionary.txt') as in_file:
    __snake_case   :      List[Any]						    =  in_file.read().splitlines()

  __snake_case   :      dict						    =  {}
  for word in word_list:
    __snake_case   :      Optional[int]						    =  get_word_pattern(word)
    if pattern in all_patterns:
      all_patterns[pattern].append(word)
    else:
      __snake_case   :      Optional[int]						    =  [word]

  with open('word_patterns.txt', 'w') as out_file:
    out_file.write(pprint.pformat(all_patterns))

  __snake_case   :      List[str]						    =  round(time.time() - start_time, 2)
  print(F"""Done!  {len(all_patterns):,} word patterns found in {total_time} seconds.""")
  # Done!  9,581 word patterns found in 0.58 seconds.







'''simple docstring'''




from scipy.constants import g





def      _UpperCAmelCase    (							_UpperCamelCase    :	float,   _UpperCamelCase    :	float   )	->      float:
    if mass < 0:
        # handling of negative values of mass
        raise ValueError('''The mass of a body cannot be negative'''   )
    if height < 0:
        # handling of negative values of height
        raise ValueError('''The height above the ground cannot be negative'''   )
    return mass * g * height


if __name__ == "__main__":
  from doctest import testmod

  testmod(name='potential_energy')






