from __future__ import print_function
import grpc
import Calc_pb2
import Calc_pb2_grpc


def run():
    channel = grpc.insecure_channel('localhost:50050')
    stub = Calc_pb2_grpc.CalculatorStub(channel)
    response = stub.Add(Calc_pb2.AddRequest(n1=20, n2=10))
    print(response.n1)
    response = stub.Subtract(Calc_pb2.SubtractRequest(n1=20, n2=10))
    print(response.n1)
    response = stub.Multiply(Calc_pb2.MultiplyRequest(n1=20, n2=10))
    print(response.n1)
    response = stub.Divide(Calc_pb2.DivideRequest(n1=20, n2=10))
    print(response.f1)


if __name__ == '__main__':
    run()

f54b3066e963493c7d46fa81f27125bf9fa5e06b
<mask token>

<mask token>


def run():
    channel = grpc.insecure_channel('localhost:50050')
    stub = Calc_pb2_grpc.CalculatorStub(channel)
    response = stub.Add(Calc_pb2.AddRequest(n1=20, n2=10))
    print(response.n1)
    response = stub.Subtract(Calc_pb2.SubtractRequest(n1=20, n2=10))
    print(response.n1)
    response = stub.Multiply(Calc_pb2.MultiplyRequest(n1=20, n2=10))
    print(response.n1)
    response = stub.Divide(Calc_pb2.DivideRequest(n1=20, n2=10))
    print(response.f1)


<mask token>

<mask token>


def run():
    channel = grpc.insecure_channel('localhost:50050')
    stub = Calc_pb2_grpc.CalculatorStub(channel)
    response = stub.Add(Calc_pb2.AddRequest(n1=20, n2=10))
    print(response.n1)
    response = stub.Subtract(Calc_pb2.SubtractRequest(n1=20, n2=10))
    print(response.n1)
    response = stub.Multiply(Calc_pb2.MultiplyRequest(n1=20, n2=10))
    print(response.n1)
    response = stub.Divide(Calc_pb2.DivideRequest(n1=20, n2=10))
    print(response.f1)


if __name__ == '__main__':
    run()

from __future__ import print_function
import grpc
import Calc_pb2
import Calc_pb2_grpc


def run():
    channel = grpc.insecure_channel('localhost:50050')
    stub = Calc_pb2_grpc.CalculatorStub(channel)
    response = stub.Add(Calc_pb2.AddRequest(n1=20, n2=10))
    print(response.n1)
    response = stub.Subtract(Calc_pb2.SubtractRequest(n1=20, n2=10))
    print(response.n1)
    response = stub.Multiply(Calc_pb2.MultiplyRequest(n1=20, n2=10))
    print(response.n1)
    response = stub.Divide(Calc_pb2.DivideRequest(n1=20, n2=10))
    print(response.f1)


if __name__ == '__main__':
    run()
