




'''simple docstring'''


from math import factorial


def 						SCREAMING_SNAKE_CASE       (      a_	:							int				,					a_	:							int			):

  # If either of the conditions are true, the function is being asked
  # to calculate a factorial of a negative number, which is not possible
  if n < k or k < 0:
    raise ValueError('Please enter positive integers for n and k where n >= k'			)
  return factorial(a_			) // (factorial(a_			) * factorial(n - k			))


if __name__ == "__main__":
  print(
      "The number of five-card hands possible from a standard",
      f"""fifty-two card deck is: {combinations(52, 5)}\n""",
  )

  print(
      "If a class of 40 students must be arranged into groups of",
      f"""4 for group projects, there are {combinations(40, 4)} ways""",
      "to arrange them.\n",
  )

  print(
      "If 10 teams are competing in a Formula One race, there",
      f"""are {combinations(10, 3)} ways that first, second and""",
      "third place can be awarded.",
  )









'''simple docstring'''


def 						SCREAMING_SNAKE_CASE       (      a_	:							str			):
  __a			=					''
  for ch in key:
    if ch == " " or ch not in key_no_dups and ch.isalpha():
      key_no_dups += ch
  return key_no_dups


def 						SCREAMING_SNAKE_CASE       (      a_	:							str			):
  __a			=					[chr(i + 65			) for i in range(26			)]
  # Remove duplicate characters from key
  __a			=					remove_duplicates(key.upper()			)
  __a			=					len(a_			)
  # First fill cipher with key characters
  __a			=					{alphabet[i]: char for i, char in enumerate(a_			)}
  # Then map remaining characters in alphabet to
  # the alphabet from the beginning
  for i in range(len(a_			)				,					26			):
    __a			=					alphabet[i - offset]
    # Ensure we are not mapping letters to letters previously mapped
    while char in key:
      offset -= 1
      __a			=					alphabet[i - offset]
    __a			=					char
  return cipher_alphabet


def 						SCREAMING_SNAKE_CASE       (      a_	:							str				,					a_	:							dict[str, str]			):
  return "".join(cipher_map.get(a_				,					a_			) for ch in message.upper()			)


def 						SCREAMING_SNAKE_CASE       (      a_	:							str				,					a_	:							dict[str, str]			):
  __a			=					{v: k for k, v in cipher_map.items()}
  return "".join(rev_cipher_map.get(a_				,					a_			) for ch in message.upper()			)


def 						SCREAMING_SNAKE_CASE       (      ):
  __a			=					input('Enter message to encode or decode: '			).strip()
  __a			=					input('Enter keyword: '			).strip()
  __a			=					input('Encipher or decipher? E/D:'			).strip()[0].lower()
  try:
    __a			=					{'e': encipher, 'd': decipher}[option]
  except KeyError:
    raise KeyError('invalid input option'			)
  __a			=					create_cipher_map(a_			)
  print(func(a_				,					a_			)			)


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  main()



