In the popular television game show of the 70s, Let's Make a Deal, game show host, Monty Hall, would show a contestant 3 doors. Behind one of the doors was a prize and the contestant would have to guess which one it was. Once the contestant made a guess which door led to the prize, Monty Hall would open of the other doors showing that the prize was not behind it. The contestant then had the opportunity of changing his or her guess or sticking to the original guess. Monty Hall would then open the door that concealed the prize.
The common place belief was that there was no real advantage in changing one's guess. The reasoning went as follows: since one of the doors was eliminated, the prize would be behind one of the two remaining doors, i.e. the probability of if being behind the door the contestant guessed was 0.5. The probability of the prize being behind the other door was also 0.5. So the prize being behind one of the two doors was just as likely as being behind the other door. It did not make sense to switch.
In 1990, a reader of Parade magazine, wrote to Marilyn vos Savant asking her what the best strategy would be to play this game. Her advice was, that no matter what the initial guess was, to switch. You should read all the comments that other readers sent her including college professors berating her for her suggestion. But subsequent analysis has shown that she was right.
In this programming assignment you are going to simulate the game show and demonstrate that indeed Marilyn vos Savant gave sensible advice. The following describes the steps that you will be taking:
A sample session and output will look as follows:
Enter number of times you want to play: 10 Prize Guess View New Guess 2 2 3 1 1 3 2 1 1 1 2 3 3 1 2 3 3 1 2 3 3 1 2 3 2 2 3 1 2 1 3 2 3 2 1 3 2 1 3 2 Probability of winning if you switch = 0.70 Probability of winning if you do not switch = 0.30Your output must be in the above format. The column headers and numbers must be printed as shown. The probabilites are expressed correct to 2 places of decimal. You can use the round() function to do so. There is a good discussion in the book in Chapter 3, Section 3.6. Please read this section carefully and get the formatting correct.
Your program should have a good, clean logical structure. You must print out the results in the format specified. We will be looking at good documentation and descriptive variable names. Your file Deal.py will have the following header:
# File: Deal.py # Description: # Student Name: # Student UT EID: # Course Name: CS 303E # Unique Number: # Date Created: # Date Last Modified:
Use the Canvas program to submit your Deal.py file. We should receive your work by 11 PM on Friday, 20 Oct 2017. There will be substantial penalties if you do not adhere to the guidelines.