




import string
from math import logaa

def    UpperCAmelCase_				( __UpperCAmelCase		:      str     ,     __UpperCAmelCase		:      str				)   ->					int:
      SCREAMING_SNAKE_CASE_      		=     document.translate(
          str.maketrans(''     ,     ''     ,     string.punctuation				)				).replace('\n'     ,     ''				)
      SCREAMING_SNAKE_CASE_      		=     document_without_punctuation.split(' '				)  # word tokenization
      return len([word for word in tokenize_document if word.lower() == term.lower()]				)

def    UpperCAmelCase_				( __UpperCAmelCase		:      str     ,     __UpperCAmelCase		:      str				)   ->					tuple[int, int]:
      SCREAMING_SNAKE_CASE_      		=     corpus.lower().translate(
          str.maketrans(''     ,     ''     ,     string.punctuation				)				)  # strip all punctuation and replace it with ''
      SCREAMING_SNAKE_CASE_      		=     corpus_without_punctuation.split('\n'				)
      SCREAMING_SNAKE_CASE_      		=     term.lower()
      return (len([doc for doc in docs if term in doc]				), len(__UpperCAmelCase				))

def    UpperCAmelCase_				( __UpperCAmelCase		:      int     ,     __UpperCAmelCase		:      int     ,     __UpperCAmelCase		:      int=False				)   ->					float:
      if smoothing:
            if n == 0:
                  raise ValueError('log10(0) is undefined.'				)
            return round(1 + logaa(n / (1 + df)				)     ,     3				)

      if df == 0:
            raise ZeroDivisionError('df must be > 0'				)
      elif n == 0:
            raise ValueError('log10(0) is undefined.'				)
      return round(logaa(n / df				)     ,     3				)





def    UpperCAmelCase_				( __UpperCAmelCase		:      int     ,     __UpperCAmelCase		:      int				)   ->					float:
      return round(tf * idf     ,     3				)







UpperCamelCase    							=      8.3_144_598


def 				__lowerCamelCase     (							__lowerCAmelCase							:					float					,							__lowerCAmelCase							:					float							)     ->  float:
   if temperature < 0:
      raise Exception("""Temperature cannot be less than 0 K"""							)
   if molar_mass <= 0:
      raise Exception("""Molar mass cannot be less than or equal to 0 kg/mol"""							)
   else:
      return (3 * UNIVERSAL_GAS_CONSTANT * temperature / molar_mass) ** 0.5


if __name__ == "__main__":
       import doctest

       # run doctest
       doctest.testmod()

       # example
       UpperCamelCase    							=      300
       UpperCamelCase    							=      28
       UpperCamelCase    							=      rms_speed_of_molecule(temperature, molar_mass)
       print(F"""Vrms of Nitrogen gas at 300 K is {vrms} m/s""")



