+ 8
[Challenge] Normal Distribution
> Make a game that rolls a dice n times and returns the MEAN result value. > Play that game N times and keep track of the returns you're getting. > Show the result somehow. The distribution of results will be within [1, 6] and should look like a normal distribution around 3.5 (due to the central limit theorem -- see Wikipedia for that). I made a python code using the toss of a coin, so it goes from 0 to 1: PC: https://code.sololearn.com/cLVOcQU9LqiV/#py Phone: https://code.sololearn.com/cKhrPsZBgD2H/#py These are my first ones in SoloLearn, so I also accept critics on them. You don't need to do it in python. Happy coding.
3 odpowiedzi
+ 4
+ 7
just set the number of samples, and max/min values
https://code.sololearn.com/WLgGhMLpC6n2/?ref=app
+ 2
as usual, using python.
https://code.sololearn.com/c5MgT3pGLFBQ/?ref=app