Machine Learning, Data Science.
= plt.subplots(figsize=(12, 9)) ax.set_aspect('equal') ax.scatter(x_inside, y_inside, s=20, c='b') ax.scatter(x_outside, y_outside, s=20, c='r') fig.show() ratio = (float(hits) / samples) * 4 print('Estimate with {0} samples: {1}'.format(samples, ratio)) This function will plot randomly-generated