Skip to content

A program which can simulate and show the results of the "Monty hall problem"

Notifications You must be signed in to change notification settings

Magrgo/Monthy-Hall-Problem-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Monthy-Hall-Problem-Simulator

thumbn

A program which can simulate the "Monty Hall problem" visually

The Game

In the problem, you are on a game show, being asked to choose between three doors. Behind each door, there is either a prize or nothing. You choose a door. The host, Monty Hall, picks one of the other doors, which he knows has nothing behind it, and opens it, showing you the empty space. Monty then asks whether you would like to switch your choice of door to the other remaining door. Assuming you prefer to get the prize, do you choose to switch or not to switch?

The solution is that switching will let you win twice as often as sticking with the original choice, a result that seems counterintuitive to many.

Programming

-Programmed in python 3.11.8.
-No external libraries needed to be installed to run the script.
-GUI made with 'tkinter' standard library. Design is responsive until a specific degree.
-It's using built in 'random' module to make choices randomly, source code confirms it.

mhp

Credits

All credits to vecteezy.com creators for images and icons.