





"""simple docstring"""





import math


def 					a__    (    ):




		"""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 					a__    (    _SCREAMING_SNAKE_CASE     ,		_SCREAMING_SNAKE_CASE			):




		"""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 					a__    (    _SCREAMING_SNAKE_CASE     ,		_SCREAMING_SNAKE_CASE			):




		"""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,  __A = False							)     ->				float:







      '''simple docstring'''


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


# Initial Value
UpperCamelCase__											=					0.0_2




def    lowerCAmelCase_ (     __A,  __A							)     ->				float:







      '''simple docstring'''


      UpperCAmelCase__								=  float(2 * (random.randint(1,  100							)) - 1							)

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

      return layer_a * 100


if __name__ == "__main__":
      import doctest

      doctest.testmod()

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



