This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A simulation to settle a Twitter argument: | |
# https://twitter.com/brenorb/status/1213898659752038400 | |
import random | |
random.seed(42) # For reproducible results | |
# We have four possible scenarios we can simulate, based on these two bools. | |
# The first determines whether it's permissible for the host to reveal the car | |
# on the first door-opening. The second determines whether the contestant is | |
# using an "always swap" strategy or an "always stick" strategy. |