





from __future__ import annotations

import typing
from collections.abc import Iterable

import numpy as np

_A :   str  			=  typing.Union[Iterable[float], Iterable[int], np.ndarray]  # noqa: UP007
_A :   Tuple  			=  typing.Union[np.floataa, int, float]  # noqa: UP007



def 	_a						(   UpperCAmelCase      ,  UpperCAmelCase					)    ->    VectorOut:







   """simple docstring"""
   return np.sqrt(np.sum((np.asarray(UpperCAmelCase					) - np.asarray(UpperCAmelCase					)) ** 2					)					)



def 	_a						(   UpperCAmelCase      ,  UpperCAmelCase					)    ->    VectorOut:







   """simple docstring"""
   return sum((va - va) ** 2 for va, va in zip(UpperCAmelCase      ,  UpperCAmelCase					)					) ** (1 / 2)


if __name__ == "__main__":



       def 	_a						(   )    ->    None:







          """simple docstring"""
          from timeit import timeit

          print('''Without Numpy'''					)
          print(
              timeit(
                  '''euclidean_distance_no_np([1, 2, 3], [4, 5, 6])'''      ,  number=10000      ,  globals=globals()      ,  )					)
          print('''With Numpy'''					)
          print(
              timeit(
                  '''euclidean_distance([1, 2, 3], [4, 5, 6])'''      ,  number=10000      ,  globals=globals()      ,  )					)




       benchmark()










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))



