- :{0}=>L1
- :L1=>L2
- :Prompt N
- :For(I, 1, N, 1)
- :randInt(1,6,2)=>L1
- :sum(L1)=>L2(I)
- :End
- :PlotsOff
- :Plot1(Histogram, L2)
- :2=>Xmin
- :13=>Xmax
- :1=>Xscl
- :0=>Ymin
- :.5*N=>Ymax
- :10=>Yscl
- :seq(X, X, 2, 12)=>L3
- :N*{1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1}/36=>L4
- :Plot2(Scatter, L3, L4, .)
- :Text(5, 5, "N=")
- :Text(5, 12, N)
- :DispGraph
|
|
- Clears L1.
- Clears L2.
- Prompts user for number of rolls.
- Instructs calculator to perform N rolls.
- Rolls two dice.
- Sums the pair of dice.
- Completes the rolling N times.
- Turns all statistics plots off.
- Sets up histogram.
- Sets up approprite viewing window for graph.
-
-
-
-
-
-
- Sets up list for outcomes of rolls, 2 through 12.
- Sets up list for theoretical outcome of N rolls.
- Sets up theoretical plot.
- Sets up some text on the graph.
-
- Shows the result.
|
|