In the game show Lets Make a Deal, a contestant is presented with three doors. Behind one

Question:

In the game show Let’s Make a Deal, a contestant is presented with three doors. Behind one of them is a valuable prize. After the contestant chooses a door, the host opens one of the other two doors (never revealing the prize, of course). The contestant is then given the opportunity to switch to the other unopened door. Should the contestant do so? Intuitively, it might seem that the contestant’s initial choice door and the other unopened door are equally likely to contain the prize, so there would be no incentive to switch. Write a program MonteHall to test this intuition by simulation. Your program should take a commandline argument n, play the game n times using each of the two strategies (switch or do not switch), and print the chance of success for each of the two strategies.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question
Question Posted: