





'''simple docstring'''




from __future__ import annotations

from collections.abc import Sequence
from typing import Literal






def 			_lowerCAmelCase     (    __snake_case    :					str					,				__snake_case    :					str     )	->	str | Literal[False]:
     __A		:					Optional[int]						=			list(__snake_case     )
     __A		:					int						=			list(__snake_case     )
     __A		:					List[str]						=			0
     for i in range(len(__snake_case     )     ):
          if lista[i] != lista[i]:
               count += 1
               __A		:					Tuple						=			'_'
     if count > 1:
          return False
     else:
          return "".join(__snake_case     )






def 			_lowerCAmelCase     (    __snake_case    :					list[str]     )	->	list[str]:
     __A		:					List[str]						=			[]
     while True:
          __A		:					Optional[int]						=			['$'] * len(__snake_case     )
          __A		:					Dict						=			[]
          for i in range(len(__snake_case     )     ):
               for j in range(i + 1					,				len(__snake_case     )     ):
                    __A		:					Any						=			compare_string(binary[i]					,				binary[j]     )
                    if k is False:
                         __A		:					List[str]						=			'*'
                         __A		:					List[str]						=			'*'
                         temp.append('X'     )
          for i in range(len(__snake_case     )     ):
               if checka[i] == "$":
                    pi.append(binary[i]     )
          if len(__snake_case     ) == 0:
               return pi
          __A		:					Union[str, Any]						=			list(set(__snake_case     )     )






def 			_lowerCAmelCase     (    __snake_case    :					int					,				__snake_case    :					Sequence[float]     )	->	list[str]:
     __A		:					Optional[int]						=			[]
     for minterm in minterms:
          __A		:					Tuple						=			''
          for _ in range(__snake_case     ):
               __A		:					int						=			str(minterm % 2     ) + string
               minterm //= 2
          temp.append(__snake_case     )
     return temp






def 			_lowerCAmelCase     (    __snake_case    :					str					,				__snake_case    :					str					,				__snake_case    :					int     )	->	bool:
     __A		:					str						=			list(__snake_case     )
     __A		:					List[Any]						=			list(__snake_case     )
     __A		:					List[Any]						=			0
     for i in range(len(__snake_case     )     ):
          if lista[i] != lista[i]:
               count_n += 1
     return count_n == count






def 			_lowerCAmelCase     (    __snake_case    :					list[list[int]]					,				__snake_case    :					list[str]     )	->	list[str]:
     __A		:					List[str]						=			[]
     __A		:					Any						=			[0] * len(__snake_case     )
     for i in range(len(chart[0]     )     ):
          __A		:					List[str]						=			0
          __A		:					int						=			-1
          for j in range(len(__snake_case     )     ):
               if chart[j][i] == 1:
                    count += 1
                    __A		:					Any						=			j
          if count == 1:
               __A		:					Dict						=			1
     for i in range(len(__snake_case     )     ):
          if select[i] == 1:
               for j in range(len(chart[0]     )     ):
                    if chart[i][j] == 1:
                         for k in range(len(__snake_case     )     ):
                              __A		:					Optional[Any]						=			0
               temp.append(prime_implicants[i]     )
     while True:
          __A		:					List[str]						=			0
          __A		:					Optional[Any]						=			-1
          __A		:					Tuple						=			0
          for i in range(len(__snake_case     )     ):
               __A		:					Optional[Any]						=			chart[i].count(1     )
               if count_n > max_n:
                    __A		:					List[Any]						=			count_n
                    __A		:					List[str]						=			i

          if max_n == 0:
               return temp

          temp.append(prime_implicants[rem]     )

          for i in range(len(chart[0]     )     ):
               if chart[rem][i] == 1:
                    for j in range(len(__snake_case     )     ):
                         __A		:					Dict						=			0






def 			_lowerCAmelCase     (    __snake_case    :					list[str]					,				__snake_case    :					list[str]     )	->	list[list[int]]:
     __A		:					Union[str, Any]						=			[[0 for x in range(len(__snake_case     )     )] for x in range(len(__snake_case     )     )]
     for i in range(len(__snake_case     )     ):
          __A		:					Optional[int]						=			prime_implicants[i].count('_'     )
          for j in range(len(__snake_case     )     ):
               if is_for_table(prime_implicants[i]					,				binary[j]					,				__snake_case     ):
                    __A		:					int						=			1

     return chart






def 			_lowerCAmelCase     (    )	->	None:
     __A		:					Optional[Any]						=			int(input('Enter the no. of variables\n'     )     )
     __A		:					Optional[int]						=			[
         float(__snake_case     )
         for x in input(
             'Enter the decimal representation of Minterms \'Spaces Separated\'\n'     ).split()
     ]
     __A		:					Optional[Any]						=			decimal_to_binary(__snake_case					,				__snake_case     )

     __A		:					Dict						=			check(__snake_case     )
     print('Prime Implicants are:'     )
     print(__snake_case     )
     __A		:					List[Any]						=			prime_implicant_chart(__snake_case					,				__snake_case     )

     __A		:					Tuple						=			selection(__snake_case					,				__snake_case     )
     print('Essential Prime Implicants are:'     )
     print(__snake_case     )


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  main()


"""simple docstring"""
import requests




def 					a__						(						lowerCAmelCase			,	lowerCAmelCase    )	-> None:
      UpperCAmelCase__			:							List[str]							=    {"""Content-Type""": """application/json"""}
      UpperCAmelCase__			:							List[str]							=    requests.post(lowerCAmelCase			,	json={"""text""": message_body}			,	headers=lowerCAmelCase    )
      if response.status_code != 2_00:
            UpperCAmelCase__			:							str							=    (
                """Request to slack returned an error """
                F"""{response.status_code}, the response is:\n{response.text}"""
            )
            raise ValueError(lowerCAmelCase    )


if __name__ == "__main__":
    # Set the slack url to the one provided by Slack when you create the webhook at
    # https://my.slack.com/services/new/incoming-webhook/
    send_slack_message("""<YOUR MESSAGE BODY>""", """<SLACK CHANNEL URL>""")

