





def 	_a						(   UpperCAmelCase					)    ->    List[str]:







   """simple docstring"""
   return 10 - x * x



def 	_a						(   UpperCAmelCase      ,  UpperCAmelCase					)    ->    Tuple:







   """simple docstring"""
   # Bolzano theory in order to find if there is a root between a and b
   if equation(UpperCAmelCase					) * equation(UpperCAmelCase					) >= 0:
      raise ValueError('''Wrong space!'''					)

   lowerCamelCase__       :						Optional[Any]        =							a
   while (b - a) >= 0.01:
      # Find middle point
      lowerCamelCase__       :						Dict        =							(a + b) / 2
      # Check if middle point is root
      if equation(UpperCAmelCase					) == 0.0:
         break
      # Decide the side to repeat the steps
      if equation(UpperCAmelCase					) * equation(UpperCAmelCase					) < 0:
         lowerCamelCase__       :						List[Any]        =							c
      else:
         lowerCamelCase__       :						str        =							c
   return c


if __name__ == "__main__":
       import doctest

       doctest.testmod()

       print(bisection(-2, 5))
       print(bisection(0, 6))










import math
import random



def 	_a						(   UpperCAmelCase      ,  UpperCAmelCase = False					)    ->    float:







   """simple docstring"""
   if deriv:
      return value * (1 - value)
   return 1 / (1 + math.exp(-value					))


# Initial Value
_A :   Tuple  			=  0.02



def 	_a						(   UpperCAmelCase      ,  UpperCAmelCase					)    ->    float:







   """simple docstring"""
   lowerCamelCase__       :						List[Any]        =							float(2 * (random.randint(1      ,  100					)) - 1					)

   for _ in range(UpperCAmelCase					):
      # Forward propagation
      lowerCamelCase__       :						Optional[int]        =							sigmoid_function(INITIAL_VALUE * weight					)
      # How much did we miss?
      lowerCamelCase__       :						int        =							(expected / 100) - layer_a
      # Error delta
      lowerCamelCase__       :						Union[str, Any]        =							layer_1_error * sigmoid_function(UpperCAmelCase      ,  UpperCAmelCase					)
      # Update weight
      weight += INITIAL_VALUE * layer_1_delta

   return layer_a * 100


if __name__ == "__main__":
       import doctest

       doctest.testmod()

       _A :   Union[str, Any]  			=  int(input('Expected value: '))
       _A :   int  			=  int(input('Number of propagations: '))
       print(forward_propagation(expected, number_propagations))



