Anonymous user
Two bullet roulette: Difference between revisions
m
added whitespace, indented options.
m (→{{header|REXX}}: simplified the code, add some wording to the REXX section header.) |
m (added whitespace, indented options.) |
||
Line 3:
The following is supposedly a question given to mathematics graduates seeking jobs on Wall Street:
A. Spinning the cylinder after loading the first bullet, and spinning again after the first shot.
B. Spinning the cylinder after loading the first bullet only.
C. Spinning the cylinder after firing the first shot only.
D. Not spinning the cylinder either after loading the first bullet or after the first shot.
E. The probability is the same for all cases.
;Task:
# Run a repeated simulation of each of the above scenario, calculating the percentage of suicide with a randomization of the four spinning, loading and firing order scenarios.
# Show the results as a percentage of deaths for each type of scenario.
# The hand calculated probabilities are 5/9, 7/12, 5/9, and 1/2. A correct program should produce results close enough to those to allow a correct response to the interview question.
;Reference:
Youtube video on the Russian 1895 Nagant revolver [[https://www.youtube.com/watch?v=Dh1mojMaEtM]]
<br><br>
=={{header|C}}==
|