Description Usage Arguments Details Value Examples
View source: R/monty-hall-problem Script.R
play_game()
is a function that tests the Monty Hall game and tells what
will happen if the CONTESTANT choose to stay or change his selection.
1 |
... |
no arguments are used by the function. |
THe function will play the game will be played by running the functions in order in a script. The game script will be in run a functions in the following order:
One function that sets up the game (three doors, one car, two goats).
One function that selects a door for your first guess.
One function that reveals a goat for the host.
One function that makes your final pick (depending upon if you intend to stay or switch). 5.One function that decides if you win the car or not.
Strategy of the CONTESTANT : Stay or Switch and in each case the outcome: WIN or Lose
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.