number_of_drops_in_circle = len(drops_in_circle) number_of_drops_out_of_circle = len(drops_out_of_circle) number_of_drops = number_of_drops_in_circle + number_of_drops_out_of_circle plt.figure() plt.xlim(-length_of_field / 2, length_of_field / 2) plt.ylim(-length_of_field / 2, length_of_field / 2) plt.scatter([e for e in drops_in_circle], [e for e in drops_in_circle], color='blue', label="Drops in circle") plt.scatter([e for e in drops_out_of_circle], [e for e in drops_out_of_circle], color='black', label="Drops out of circle") plt.legend(loc="center") plt.title("%s drops: %s landed in circle, estimating $\pi$ as %.4f." % (number_of_drops, number_of_drops_in_circle, 4 * number_of_drops_in_circle / number_of_drops)) plt.savefig("%s_drops.%s" % (number_of_drops, format))
I have nothing to put on my CV!
Please send help and food,
3rd Year Tutee
2 pages: 30 % of total mark
25 minutes: 70 % of total mark