select_door: Selecting a door

Description Usage Arguments Details Value Examples

View source: R/monty-hall-problem Script.R

Description

select_door()Randomly select one door out of ( 1,2,3 ) set and return the selection

Usage

1

Arguments

...

no arguments are used by the function.

Details

Assume that a room is equipped with three doors. Behind two are goats, and behind the third is a shiny new car. In this function the player is picking a random door out of the three doors, and the game will continue as the player will see below till he win or lose.

Value

The function returns a number between 1 and 3

Examples

1
2

Rami-Assaad/montyhall documentation built on Dec. 18, 2021, 9:52 a.m.