| Download
Project: Peter's Files
Views: 3893Visibility: Unlisted (only visible to those who know the link)
Image: ubuntu1804Kernel: Python 3 (system-wide)
Monty Hall Simulation
In [2]:
In [3]:
In [4]:
doors are [False, True, False]
contestant chooses 0
monty opens 2
contestant chooses to switch so is at 1
contestant wins
('switch', True)
In [5]:
In [12]:
In [15]:
Switch and win: 66.662 %
Switch and lose: 33.338 %
Stay and win: 33.36 %
Stay and lose: 66.64 %
In [16]:
Switch and win: 33.285 %
Switch and lose: 66.715 %
Stay and win: 33.452 %
Stay and lose: 66.548 %
In [0]: