'''simple docstring'''




import math
import random




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


# Initial Value
_lowercase						: Union[str, Any]						=						0.0_2




def 							lowerCamelCase	(      UpperCAmelCase__       :					int      ,      UpperCAmelCase__       :					int )			->      float:
							lowercase_					:			List[str]										=       float(2 * (random.randint(1      ,      100 )) - 1 )

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

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






'''simple docstring'''




import operator as op




def 							lowerCamelCase	(      UpperCAmelCase__       :					Optional[Any] )			->      int:
							lowercase_					:			Optional[Any]										=       []
							lowercase_					:			str										=       lambda UpperCAmelCase__      ,      UpperCAmelCase__ : int(x / y )  # noqa: E731 integer division operation
							lowercase_					:			Optional[Any]										=       {
							    """^""": op.pow,
							    """*""": op.mul,
							    """/""": div,
							    """+""": op.add,
							    """-""": op.sub,
							}  # operators & their respective operation

							# print table header
							print("""Symbol""".center(8 )      ,      """Action""".center(12 )      ,      """Stack"""      ,      sep=""" | """ )
							print("""-""" * (30 + len(UpperCAmelCase__ )) )

							for x in post_fix:
														if x.isdigit():  # if x in digit
																					stack.append(UpperCAmelCase__ )  # append x to stack
																					# output in tabular format
																					print(x.rjust(8 )      ,      ("""push(""" + x + """)""").ljust(12 )      ,      """,""".join(UpperCAmelCase__ )      ,      sep=""" | """ )
														else:
																					lowercase_					:			str										=       stack.pop()  # pop stack
																					# output in tabular format
																					print("""""".rjust(8 )      ,      ("""pop(""" + b + """)""").ljust(12 )      ,      """,""".join(UpperCAmelCase__ )      ,      sep=""" | """ )

																					lowercase_					:			Optional[int]										=       stack.pop()  # pop stack
																					# output in tabular format
																					print("""""".rjust(8 )      ,      ("""pop(""" + a + """)""").ljust(12 )      ,      """,""".join(UpperCAmelCase__ )      ,      sep=""" | """ )

																					stack.append(
																					    str(opr[x](int(UpperCAmelCase__ )      ,      int(UpperCAmelCase__ ) ) ) )  # evaluate the 2 values popped from stack & push result to stack
																					# output in tabular format
																					print(
																					    x.rjust(8 )      ,      ("""push(""" + a + x + b + """)""").ljust(12 )      ,      """,""".join(UpperCAmelCase__ )      ,      sep=""" | """      ,      )

							return int(stack[0] )


if __name__ == "__main__":
						_lowercase						: Tuple						=						input("\n\nEnter a Postfix Equation (space separated) = ").split(" ")
						print("\n\tResult = ", solve(Postfix))





