

"""simple docstring"""



import math
import random





def        _snake_case   (			UpperCAmelCase_     :    float    ,      UpperCAmelCase_     :    bool = False	):
     if deriv:
          return value * (1 - value)
     return 1 / (1 + math.exp(-value	))


# Initial Value
SCREAMING_SNAKE_CASE_    :		Union[str, Any]							     =  0.02





def        _snake_case   (			UpperCAmelCase_     :    int    ,      UpperCAmelCase_     :    int	):
     A__								=     float(2 * (random.randint(1    ,      100	)) - 1	)

     for _ in range(UpperCAmelCase__	):
          # Forward propagation
          A__								=     sigmoid_function(INITIAL_VALUE * weight	)
          # How much did we miss?
          A__								=     (expected / 100) - layer_a
          # Error delta
          A__								=     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()

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







'''simple docstring'''




_lowercase						: str						=						tuple[float, float, float]
_lowercase						: List[Any]						=						tuple[float, float, float]




def 							lowerCamelCase	(      UpperCAmelCase__       :					Pointad      ,      UpperCAmelCase__       :					Pointad )			->      Vectorad:
							lowercase_					:			List[str]										=       end_pointa[0] - end_pointa[0]
							lowercase_					:			Union[str, Any]										=       end_pointa[1] - end_pointa[1]
							lowercase_					:			List[Any]										=       end_pointa[2] - end_pointa[2]
							return (x, y, z)




def 							lowerCamelCase	(      UpperCAmelCase__       :					Vectorad      ,      UpperCAmelCase__       :					Vectorad )			->      Vectorad:
							lowercase_					:			List[Any]										=       ab[1] * ac[2] - ab[2] * ac[1]  # *i
							lowercase_					:			Union[str, Any]										=       (ab[0] * ac[2] - ab[2] * ac[0]) * -1  # *j
							lowercase_					:			List[str]										=       ab[0] * ac[1] - ab[1] * ac[0]  # *k
							return (x, y, z)




def 							lowerCamelCase	(      UpperCAmelCase__       :					Vectorad      ,      UpperCAmelCase__       :					int )			->      bool:
							return tuple(round(UpperCAmelCase__      ,      UpperCAmelCase__ ) for x in vector ) == (0, 0, 0)




def 							lowerCamelCase	(      UpperCAmelCase__       :					Pointad      ,      UpperCAmelCase__       :					Pointad      ,      UpperCAmelCase__       :					Pointad      ,      UpperCAmelCase__       :					int = 10 )			->      bool:
							lowercase_					:			Dict										=       create_vector(UpperCAmelCase__      ,      UpperCAmelCase__ )
							lowercase_					:			Optional[int]										=       create_vector(UpperCAmelCase__      ,      UpperCAmelCase__ )
							return is_zero_vector(get_ad_vectors_cross(UpperCAmelCase__      ,      UpperCAmelCase__ )      ,      UpperCAmelCase__ )





