def tally(zcontext, url):
 zsock = zcontext.socket(zmq.PULL)
 zsock.bind(url)
 p = q = 0
 while True:
  decision = zsock.recv_string()
  q += 1
  if (decision == 'Y'):
   p += 4
  print (decision, (p / q))

def tally ( zcontext , url ) : zsock = zcontext . socket ( zmq . PULL ) zsock . bind ( url ) p = q = 0 while True : decision = zsock . recv_string ( ) q += 1 if ( decision == 'Y' ) : p += 4 print ( decision , ( p / q ) )
tally how many points fall within the unit circle .