Your algorithm works but it's always nice to see how well, and how sensitive it is to your input parameters.
First, note that for a fixed $N$, and increasing the number of iterations, the error stagnates:
It's easy to see here that your algorithm consistently underestimates $\pi$ and running it for longer won't improve the situation.
However, holding the iterations constant and changing $N$ leads to a more rapid convergence (but the error still stagnates):
Numerically, this suggests that you'll need to increase both the number of iterations and $N$ together. Intuitively, this makes sense, as the area increases you'll need more iterations to get to the bounding line.
If you'd like to increase the speed of your convergence, you may want to think about some of the other parameters: the increments $m \rightarrow 1, n \rightarrow 4$ should probably depend on $N$.
Good luck, and enjoy experimenting with other Monte-Carlo algorithms! The python code to reproduce the first plot is below:
import numpy as np
def supbro(N, n_iters, n_samples):
m = np.zeros(n_samples)
n = np.zeros(n_samples)
for _ in xrange(n_iters):
j = np.random.randint(0, N**2, n_samples).astype(float)
m += 1
idx = (np.floor(j/N)**2 + (j % N)**2) <= N**2
n[idx] += 4
N = 100
n_samples = 1000
import pylab as plt
import seaborn as sns
mu = 
for k in range(2, 5):
error = np.pi-supbro(N, 10**k, n_samples)
print "Error with N", 10**k, mu[-1]
plt.xlabel("supbro's algo error (from question 2653543)")