


import math

def 	lowerCAmelCase__			(      )  ->		None:


							'''simple docstring'''





							_UpperCAmelCase					=      input('Enter message: '	)
							_UpperCAmelCase					=      int(input(F'''Enter key [2-{len(a__	) - 1}]: '''	)	)
							_UpperCAmelCase					=      input('Encryption/Decryption [e/d]: '	)

							if mode.lower().startswith('e'	):
														_UpperCAmelCase					=      encrypt_message(a__      ,  a__	)
							elif mode.lower().startswith('d'	):
														_UpperCAmelCase					=      decrypt_message(a__      ,  a__	)

							# Append pipe symbol (vertical bar) to identify spaces at the end.
							print(F'''Output:\n{text + "|"}'''	)

def 	lowerCAmelCase__			(      a__:		int      ,  a__:		str	)  ->		str:


							'''simple docstring'''





							_UpperCAmelCase					=      [''] * key
							for col in range(a__	):
														_UpperCAmelCase					=      col
														while pointer < len(a__	):
																					cipher_text[col] += message[pointer]
																					pointer += key
							return "".join(a__	)

def 	lowerCAmelCase__			(      a__:		int      ,  a__:		str	)  ->		str:


							'''simple docstring'''





							_UpperCAmelCase					=      math.ceil(len(a__	) / key	)
							_UpperCAmelCase					=      key
							_UpperCAmelCase					=      (num_cols * num_rows) - len(a__	)
							_UpperCAmelCase					=      [''] * num_cols
							_UpperCAmelCase					=      0
							_UpperCAmelCase					=      0

							for symbol in message:
														plain_text[col] += symbol
														col += 1

														if (
														    (col == num_cols)
														    or (col == num_cols - 1)
														    and (row >= num_rows - num_shaded_boxes)
														):
																					_UpperCAmelCase					=      0
																					row += 1

							return "".join(a__	)


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		main()




import math
import random

def 	lowerCAmelCase__			(      a__:		float      ,  a__:		bool = False	)  ->		float:


							'''simple docstring'''





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


# Initial Value
lowerCAmelCase__  :Optional[Any]             =							0.02

def 	lowerCAmelCase__			(      a__:		int      ,  a__:		int	)  ->		float:


							'''simple docstring'''





							_UpperCAmelCase					=      float(2 * (random.randint(1      ,  1_0_0	)) - 1	)

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

							return layer_a * 1_0_0


if __name__ == "__main__":
		import doctest

		doctest.testmod()

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