Skip to content

omid001php/Monty-Hallproblem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Monty-Hallproblem

#################### The monty_hall function simulates one round of the Monty Hall problem. It randomly assigns one of the three doors to have the prize, randomly chooses a door for the contestant, and then reveals one of the other two doors with a goat behind it. If the contestant chooses to switch, the function chooses the other unopened door. The function returns True if the contestant wins the car, False otherwise.

The main code runs the monty_hall function 10000 times and counts how many times the contestant wins by switching. It then prints the probability of winning by switching.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages