


def 							__lowerCamelCase		(					UpperCAmelCase_		:						int = 10					,    UpperCAmelCase_		:						int = 1000					,    UpperCAmelCase_		:						bool = True		):




      """simple docstring"""





      assert (
          isinstance(UpperCAmelCase_					,    UpperCAmelCase_		)
          and isinstance(UpperCAmelCase_					,    UpperCAmelCase_		)
          and isinstance(UpperCAmelCase_					,    UpperCAmelCase_		)
      ), "Invalid type of value(s) specified to function!"

      if min_val > max_val:
            raise ValueError('''Invalid value for min_val or max_val (min_value < max_value)'''		)
      return min_val if option else max_val
def 							__lowerCamelCase		(					UpperCAmelCase_		:						int					,    UpperCAmelCase_		:						int		):




      """simple docstring"""





      return int((number_a + number_a) / 2		)
def 							__lowerCamelCase		(					UpperCAmelCase_		:						int					,    UpperCAmelCase_		:						int					,    UpperCAmelCase_		:						int		):




      """simple docstring"""





      assert (
          isinstance(UpperCAmelCase_					,    UpperCAmelCase_		) and isinstance(UpperCAmelCase_					,    UpperCAmelCase_		) and isinstance(UpperCAmelCase_					,    UpperCAmelCase_		)
      ), 'argument values must be type of "int"'

      if lower > higher:
            raise ValueError('''argument value for lower and higher must be(lower > higher)'''		)

      if not lower < to_guess < higher:
            raise ValueError(
                '''guess value must be within the range of lower and higher value'''		)

      def answer(UpperCAmelCase_		:						int		) -> str:
            if number > to_guess:
                  return "high"
            elif number < to_guess:
                  return "low"
            else:
                  return "same"

      print('''started...'''		)

      a		:List[str]									=			lower
      a		:Optional[int]									=			higher

      a		:List[str]									=			[]

      while True:
            a		:Any									=			get_avg(UpperCAmelCase_					,    UpperCAmelCase_		)
            last_numbers.append(UpperCAmelCase_		)

            if answer(UpperCAmelCase_		) == "low":
                  a		:List[str]									=			number
            elif answer(UpperCAmelCase_		) == "high":
                  a		:int									=			number
            else:
                  break

      print(F'''guess the number : {last_numbers[-1]}'''		)
      print(F'''details : {last_numbers!s}'''		)
def 							__lowerCamelCase		(					):




      """simple docstring"""





      a		:Tuple									=			int(input('''Enter lower value : '''		).strip()		)
      a		:Optional[int]									=			int(input('''Enter high value : '''		).strip()		)
      a		:Optional[int]									=			int(input('''Enter value to guess : '''		).strip()		)
      guess_the_number(UpperCAmelCase_					,    UpperCAmelCase_					,    UpperCAmelCase_		)


if __name__ == "__main__":
     main()









import datasets


snake_case							:       int										=	'''\
@InProceedings{conneau2018xnli,
  author = "Conneau, Alexis
                 and Rinott, Ruty
                 and Lample, Guillaume
                 and Williams, Adina
                 and Bowman, Samuel R.
                 and Schwenk, Holger
                 and Stoyanov, Veselin",
  title = "XNLI: Evaluating Cross-lingual Sentence Representations",
  booktitle = "Proceedings of the 2018 Conference on Empirical Methods
               in Natural Language Processing",
  year = "2018",
  publisher = "Association for Computational Linguistics",
  location = "Brussels, Belgium",
}
'''

snake_case							:       Tuple										=	'''\
XNLI is a subset of a few thousand examples from MNLI which has been translated
into a 14 different languages (some low-ish resource). As with MNLI, the goal is
to predict textual entailment (does sentence A imply/contradict/neither sentence
B) and is a classification task (given two sentences, predict one of three
labels).
'''

snake_case							:       Union[str, Any]										=	'''
Computes XNLI score which is just simple accuracy.
Args:
    predictions: Predicted labels.
    references: Ground truth labels.
Returns:
    \'accuracy\': accuracy
Examples:

    >>> predictions = [0, 1]
    >>> references = [0, 1]
    >>> xnli_metric = datasets.load_metric("xnli")
    >>> results = xnli_metric.compute(predictions=predictions, references=references)
    >>> print(results)
    {\'accuracy\': 1.0}
'''
def 							__lowerCamelCase		(					UpperCAmelCase_		:						List[Any]					,    UpperCAmelCase_		:						List[str]		):




      """simple docstring"""





      return (preds == labels).mean()







@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION		,       _KWARGS_DESCRIPTION				)
class 						_snake_case    ( datasets.Metric				):




 def 			SCREAMING_SNAKE_CASE__							(						self       ):
       return datasets.MetricInfo(
           description=_DESCRIPTION   ,    citation=_CITATION   ,    inputs_description=_KWARGS_DESCRIPTION   ,    features=datasets.Features(
               {
                   '''predictions''': datasets.Value('''int64''' if self.config_name != '''sts-b''' else '''float32'''       ),
                   '''references''': datasets.Value('''int64''' if self.config_name != '''sts-b''' else '''float32'''       ),
               }       )   ,    codebase_urls=[]   ,    reference_urls=[]   ,    format='''numpy'''   ,    )




 def 			SCREAMING_SNAKE_CASE__							(						self   ,    _lowerCamelCase   ,    _lowerCamelCase       ):
       return {"accuracy": simple_accuracy(_lowerCamelCase   ,    _lowerCamelCase       )}





