This produces a nice random walk plot:
randomWalk[n_] := Module[{steps, walk},
steps = 2 RandomInteger[{0, 1}, n] - 1;
walk = Accumulate[steps];
ListLinePlot[walk, ImageSize -> 200]]
randomWalk[200]
But if I put it in a Do loop, nothing appears.
Do[randomWalk[200], 4]


Table[randomwalk[200], 4]. This will return its results in a list, whereasDo(orFor, orWhile) do not return anything at all. – MarcoB Sep 10 '22 at 02:31Table[randomWalk[200], 4](note the uppercase W in the function name). – MarcoB Sep 11 '22 at 11:40