Skip to Content

Monty Hall Problem

In a quiz show there are three doors. Behind one is a very good prize and behind the other two there are bad prizes. The host knows which is the winning door. The contestant chooses one door. The host does not open it. Instead he opens one of the other (losing) doors. He then asks the contestant if he would like to change his mind and choose the other door. What should the contestant do?

My grade 9 students understood the problem quite easily. However, some of them had a lot of difficulty programming it. There were a few different approaches. Some students had identical doors and would physically reposition the doors at the beginning based on which was the winning door and which were the losing doors.  Other students would make extensive use of variables and logic.

 

Please click on the link to view the projects...

Comments
Megan Haddadi
Member

 Back when I was an undergrad Computer Science major at Bryn Mawr College, I created a Monty Hall program in an Introductory programming class, probably in C or C++.  Last summer at an MIT workshop I wanted to see whether Scratch was capable of producing a college-level program, so I reproduced my Monty Hall program, and it worked!  I was very impressed with the capabilities of Scratch.  

 

I agree with your 9th graders 100%- this problem is easy to understand, but it is very difficult to program.  I had so many variables I couldn't keep track of them all!  This is a wonderful project to assign introductory programming students.  Just let them kmow it takes a lot of patience and perseverence.

 

-Megan