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
# Basic implementation of the monty hall problem based on | |
# http://mathforum.org/dr.math/faq/faq.monty.hall.html | |
# | |
# Harsh Deep | |
# 18.7.2016 | |
# This is a acceptable door configuration, :goat means that there is a goat | |
# behind and :car means that there is a car behind. | |
doors = [:goat, :car, :goat] |
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
import java.util.Random; | |
public class GameShow | |
{ | |
public static void main() | |
{ | |
Random r= new Random(); | |
int stayResult=0; | |
int switchResult=0; | |
for(int x=0;x<100000;x++) | |
{ |
NewerOlder