Description Usage Arguments Details Value Examples
select_door()
is the function which simulates the user selecting a
random door.
1 |
No |
arguments are used by the function. |
The initial door selection simulates the player choosing one of three closed doors. There are goats behind two of the doors and a car behind one of the doors. At this point in the game all three doors are still closed so the player doesn't know if they picked the car door or a goat door.
The function returns a length one character vector which is a number
between 1 and 3 and represents the number of the initial door selected.
The returned value is assigned to the variable a.pick
.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.