


from __future__ import annotations

from collections import namedtuple






def 		_A		(		_lowercase					,  _lowercase					,  _lowercase )					-> tuple:


     """simple docstring"""


     __UpperCamelCase =			namedtuple('result'					,  'name value' )
     if (voltage, current, power).count(0 ) != 1:
          raise ValueError('Only one argument must be 0' )
     elif power < 0:
          raise ValueError(
              'Power cannot be negative in any electrical/electronics system' )
     elif voltage == 0:
          return result('voltage'					,  power / current )
     elif current == 0:
          return result('current'					,  power / voltage )
     elif power == 0:
          return result('power'					,  float(round(abs(voltage * current )					,  2 ) ) )
     else:
          raise ValueError('Exactly one argument must be 0' )


if __name__ == "__main__":
    import doctest

    doctest.testmod()










"""simple docstring"""







import math
import random


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


# Initial Value
_lowerCAmelCase            =	0.02


def      UpperCamelCase       ( _A  ,				_A )     ->       float:
				lowercase    :      Any       = float(2 * (random.randint(1  ,				100 )) - 1 )

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

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