





from __future__ import annotations

from collections import namedtuple


def  SCREAMING_SNAKE_CASE   ( _UpperCAmelCase		,			_UpperCAmelCase		,			_UpperCAmelCase				)    ->  tuple:
    lowerCamelCase__					:   str      				=	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()












import socket


def  SCREAMING_SNAKE_CASE   ( )    ->  Any:
    lowerCamelCase__					:   int      				=	socket.socket(socket.AF_INET		,			socket.SOCK_STREAM				)
    lowerCamelCase__					:   Optional[int]      				=	socket.gethostname()
    lowerCamelCase__					:   Optional[int]      				=	1_2312

    sock.connect((host, port)				)
    sock.send(b'Hello server!'				)

    with open('Received_file'		,			'wb'				) as out_file:
        print('File opened'				)
        print('Receiving data...'				)
        while True:
            lowerCamelCase__					:   str      				=	sock.recv(1024				)
            if not data:
                break
            out_file.write(_UpperCAmelCase				)

    print('Successfully received the file'				)
    sock.close()
    print('Connection closed'				)


if __name__ == "__main__":
    main()





