



'''simple docstring'''

import math
import random






def 		_snake_case		( _SCREAMING_SNAKE_CASE					:						float							,		_SCREAMING_SNAKE_CASE					:						bool = False							)      ->						float:







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


# Initial Value
UpperCAmelCase     		=   0.02






def 		_snake_case		( _SCREAMING_SNAKE_CASE					:						int							,		_SCREAMING_SNAKE_CASE					:						int							)      ->						float:







	"""simple docstring"""
	lowerCAmelCase   =     float(2 * (random.randint(1							,		100							)) - 1							)

	for _ in range(_SCREAMING_SNAKE_CASE							):
		# Forward propagation
		lowerCAmelCase   =     sigmoid_function(INITIAL_VALUE * weight							)
		# How much did we miss?
		lowerCAmelCase   =     (expected / 100) - layer_a
		# Error delta
		lowerCAmelCase   =     layer_1_error * sigmoid_function(_SCREAMING_SNAKE_CASE							,		_SCREAMING_SNAKE_CASE							)
		# 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))




'''simple docstring'''

import cmath
import math






def 		_snake_case		( _SCREAMING_SNAKE_CASE					:						float							,		_SCREAMING_SNAKE_CASE					:						float							,		_SCREAMING_SNAKE_CASE					:						float							,		_SCREAMING_SNAKE_CASE					:						float							)      ->						complex:







	"""simple docstring"""
	lowerCAmelCase   =     math.radians(_SCREAMING_SNAKE_CASE							)
	lowerCAmelCase   =     math.radians(_SCREAMING_SNAKE_CASE							)

	# Convert voltage and current to rectangular form
	lowerCAmelCase   =     cmath.rect(_SCREAMING_SNAKE_CASE							,		_SCREAMING_SNAKE_CASE							)
	lowerCAmelCase   =     cmath.rect(_SCREAMING_SNAKE_CASE							,		_SCREAMING_SNAKE_CASE							)

	# Calculate apparent power
	return voltage_rect * current_rect


if __name__ == "__main__":
				import doctest

				doctest.testmod()