diwas7777 / CodesHub

This open source project is made to help students find codes in different languages easily for every usecase.
https://diwas7777.github.io/CodesHub/
GNU General Public License v2.0
50 stars 136 forks source link

Create Monte_hall.py #194

Closed Shubhamprakash007 closed 2 years ago

Shubhamprakash007 commented 2 years ago

I have added a new game called monte hall in python.. The Monty Hall problem is a famous, seemingly paradoxical problem in conditional probability and reasoning using Bayes' theorem. Information affects your decision that at first glance seems as though it shouldn't.

In the problem, you are on a game show, being asked to choose between three doors. Behind each door, there is either a car or a goat. You choose a door. The host, Monty Hall, picks one of the other doors, which he knows has a goat behind it, and opens it, showing you the goat. (You know, by the rules of the game, that Monty will always reveal a goat.) Monty then asks whether you would like to switch your choice of door to the other remaining door. Assuming you prefer having a car more than having a goat, do you choose to switch or not to switch?