






import math
import random





def 		__UpperCAmelCase     (	a_				,	a_ = False):
							if deriv:
														return value * (1 - value)
							return 1 / (1 + math.exp(-value))


# Initial Value
lowercase    				=   0.02





def 		__UpperCAmelCase     (	a_				,	a_):
							snake_case_           =				float(2 * (random.randint(1				,	1_00)) - 1)

							for _ in range(a_):
														# Forward propagation
														snake_case_           =				sigmoid_function(INITIAL_VALUE * weight)
														# How much did we miss?
														snake_case_           =				(expected / 1_00) - layer_a
														# Error delta
														snake_case_           =				layer_1_error * sigmoid_function(a_				,	a_)
														# Update weight
														weight += INITIAL_VALUE * layer_1_delta

							return layer_a * 1_00


if __name__ == "__main__":
	import doctest

	doctest.testmod()

	lowercase    				=   int(input("Expected value: "))
	lowercase    				=   int(input("Number of propagations: "))
	print(forward_propagation(expected, number_propagations))













import numpy as np





def 		__UpperCAmelCase     (	a_):
							return 1 / (1 + np.exp(-vector))


if __name__ == "__main__":
	import doctest

	doctest.testmod()





