(a) Make a simulation of rolling two dice (with six faces),a
来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:英语作业 时间:2024/07/29 00:46:35
(a) Make a simulation of rolling two dice (with six faces),and note their sum.How does the probability density function look like?
(b) Do the same for three dice.
求代码.实在是研究不动了 如果能一起解答下面一道就万分感谢了!
![](http://img.wesiedu.com/upload/4/8e/48ea4315cd7d78fd836bc23856b01b63.jpg)
下面这道题第一问我会,求第二问怎样解,用了Do和For但就是有错误.
(b) Do the same for three dice.
求代码.实在是研究不动了 如果能一起解答下面一道就万分感谢了!
![](http://img.wesiedu.com/upload/4/8e/48ea4315cd7d78fd836bc23856b01b63.jpg)
下面这道题第一问我会,求第二问怎样解,用了Do和For但就是有错误.
![(a) Make a simulation of rolling two dice (with six faces),a](/uploads/image/z/16945465-49-5.jpg?t=%28a%29+Make+a+simulation+of+rolling+two+dice+%28with+six+faces%29%2Ca)
a[n_] := Module[{f},f[1] = 1; f[2] = 3; f[i_] := f[i] = f[i - 1] + f[i - 2]; f[n]]
mode[x_] := Module[{i},i = 1; While[Mod[a[2*i],Prime[x]] != 2,i++;]; i]
再问: 我用的是Table,而且最后是让画出散点图的。。。怎么画出来呢。。
再答: ListPlot[Table[mode[i], {i, 2, 30}]] i一定从2开始,因为第一个是2,没有模2是2的。最后一个质数不要太大,不然a太大,会溢出。
mode[x_] := Module[{i},i = 1; While[Mod[a[2*i],Prime[x]] != 2,i++;]; i]
再问: 我用的是Table,而且最后是让画出散点图的。。。怎么画出来呢。。
再答: ListPlot[Table[mode[i], {i, 2, 30}]] i一定从2开始,因为第一个是2,没有模2是2的。最后一个质数不要太大,不然a太大,会溢出。
a roll of the dice是什么意思
a game played with a hockey stick by two teams of six player
用make a noise,make a mistake,make faces填空
make a face和make faces 短语哪个正确
make a face与make faces有区别么?
【改错】 Make a list of six much things.
【In the middle of a faces
英语翻译A numerical simulation of ground-heat transfer adjacent
英语翻译OF SIMULATION AND DISSIMULATIONDissimulation is but a fa
1.In a group of six people,two have a mass of 60kg while thr
on a rolling basis
英语翻译A random experiment consists of rolling a tetrahedral di