Question
I need it written in python 3.6.2, and please write the code on here. You are a contestant on a game show and have won
I need it written in python 3.6.2, and please write the code on here.
You are a contestant on a game show and have won a shot at the grand prize. Before you are three
doors. $1,000,000 in cash has randomly been placed behind one door. Behind the other two doors are
the consolation prizes of dishwasher detergent. The game show host asks you to select a door, and you
randomly pick one. However, before revealing the prize behind your door, the game show host reveals
one of the other doors that contains a consolation prize. At this point, the game show host asks if you
would like to stick with your original choice or to switch to the remaining door.
Write a function to simulate the game show problem. Your functions should randomly select locations
for the prizes, select a door at random chosen by the contestants, and then determine whether the
contestant would win or lose by sticking with the original choice or switching to the remaining door. You
may wish to create additional functions invoked by the function.
Next, modify your program so that it simulates playing 10,000 games. Count the number of times the
contestant wins when switching versus staying. If you are the contestant, what choice should you make
to optimize your chances of winning the cash, or does it not matter?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started