determine_winner: Determine Winner

Description Usage Arguments Details Value Examples

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

Description

The function determines if contestant has won or lost depending on whether the contestant changed his pick or stayed with original pick.

Usage

1
determine_winner(final.pick, game)

Arguments

...

arguments used are (final.pick,game)

Details

The if function is used to further demonstrate that if contestant's final pick whether he changes his pick or not is car , he will win and if contestant's final pick was 'goat' he will lose.

Value

The function returns a WIN or LOSE

Examples

1
determine_winner(final.pick, game )

malmufre/montyhall documentation built on Sept. 20, 2020, 12:46 a.m.