Description Usage Arguments Details Value Examples
View source: R/monty-hall-problem.R
This function will help to determine if the contestant has chosen the "car" door, or if the contestant did not. A message will be displayed the "WIn" or "LOSE" words.
1 | determine_winner(final.pick, game)
|
The |
function "if" will help to run the code depending on the choice of the contestant. If the contestant chose the door with a car. then the "if" function will print in the screen "WIN" if the contestant choice was a door with a goat, the "if" function will run the code printing the "LOSE" message. |
The function will be utilizing the variables "final.pick" and "game" previously used in another function.
Depending on the final pick of the contestant, the word "WIN" or "LOSE" will be displayed.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.