



import math
import random






def        A       (      _lowerCamelCase       ,				_lowerCamelCase = False						):





							'''simple docstring'''




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


# Initial Value
_snake_case	=						0.02






def        A       (      _lowerCamelCase       ,				_lowerCamelCase						):





							'''simple docstring'''




							_lowerCAmelCase  :							List[Any]				     =					float(2 * (random.randint(1       ,				100						)) - 1						)

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

							return layer_a * 100


if __name__ == "__main__":
						import doctest

						doctest.testmod()

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





import baseaa






def        A       (      _lowerCamelCase						):





							'''simple docstring'''




							return baseaa.aaaencode(string.encode("utf-8"						)						)






def        A       (      _lowerCamelCase						):





							'''simple docstring'''




							return baseaa.aaadecode(_lowerCamelCase						).decode("utf-8"						)


if __name__ == "__main__":
						import doctest

						doctest.testmod()
