def calculate_pi(number_of_drops):
in_circle = 0
in_square = 0
for i in range(number_of_drops):
x = random.random()
y = random.random()
if math.sqrt(x*x+y*y) <= 1:
in_circle += 1
in_square += 1
return in_circle / in_square * 4
How can I plot this function wiht x being the input of the function and y the return output of the function using matplotlib ideally?
