I am new to Mathematica and I have a problem with the "For" statement. I am often in doubt where to place a "," or a ";".
I am stuck with the following : I want to generate random points in a unit circle with the following function :
randompunten[n_] := Module[{p = n, r, angle, lis, i},
lis = {};
For[i = 0;
r = RandomReal[],
angle = RandomReal[2 \[Pi]],
i <= p;
i++;
lis = Append[lis, Point[{r Cos[angle], r Sin[angle]]}]]]; lis]
The result is an empty lis
NB : I just found out that this is not the right way but aside of that : what am I doing wrong in the code ? (When I do the Append statement outside the module things work fine .