1, I think will increase the probability of the selection.
The reasons are as follows:
If the selection is not replaced, the probability of the player selecting the car is 1/3;
If the selection is changed, the probability of the contestant selecting the car is 1/3*0+2/3*1=2/3.
2, the program source code is as follows:
From random Import *
def once (doors = 3): # Simulation of a single event
Car = randrange (doors) # There's a car parked behind a door
Man = Randrange (doors) # Contestants pre-Select a door
return car = = Man # did the contestants first choose to go to the car
h = 0 # Keep Choosing the number of times you win a car
c = 0 # Change the number of times you choose to win a car
times = Int (1e6) # Number of repetitions of the experiment
For I in Range (times):
If once (): H + = 1
Else:c + = 1
Print ("Maintain selection:", h/times*100, "%\n Change Selection:", c/times*100, "%")
3. The verification result of the operation is as follows:
Python Sheep door work