The Monty Hall problem is named after Monty Hall, the host of the American television game show Let’s Make a Deal.
In the show, contestants are asked to choose between three doors
After the contestant chose a door, Monty Hall, who knew what was behind each door, would reveal a goat behind one of the two remaining doors. The contestant was then given the option to either stick with their original choice or switch to the other unopened door.
This repository simulates playing the game many times switching and non switching.
Watch the Video by Brilliant for more info.
This code uses the following libraries:
streamlit
: for building the user interface.plotly
: for plotting the resultspandas
: for storing the data
git clone ...
python3 -m venv my_env
source my_env/bin/activate
pip install streamlit pandas plotly
streamlit run app.py
This will start the local Streamlit server, and you can access the interface by opening a web browser and navigating to http://localhost:8501
.
Python | Low Code UI | Live Plotting |
Data Science | Simulation
╭━━╮╭━━━┳━━┳━━━┳━╮╱╭╮ ╭╮╱╱╭━━━┳━━━┳╮╭━┳━━━╮ ┃╭╮┃┃╭━╮┣┫┣┫╭━╮┃┃╰╮┃┃ ┃┃╱╱┃╭━━┫╭━╮┃┃┃╭┫╭━╮┃ ┃╰╯╰┫╰━╯┃┃┃┃┃╱┃┃╭╮╰╯┃ ┃┃╱╱┃╰━━┫╰━━┫╰╯╯┃┃╱┃┃ ┃╭━╮┃╭╮╭╯┃┃┃╰━╯┃┃╰╮┃┃ ┃┃╱╭┫╭━━┻━━╮┃╭╮┃┃┃╱┃┃ ┃╰━╯┃┃┃╰┳┫┣┫╭━╮┃┃╱┃┃┃ ┃╰━╯┃╰━━┫╰━╯┃┃┃╰┫╰━╯┃ ╰━━━┻╯╰━┻━━┻╯╱╰┻╯╱╰━╯ ╰━━━┻━━━┻━━━┻╯╰━┻━━━╯
follow all of these for pizza :)