Next modify your program so that it simulates playing 10000

Assignment Help Other Subject
Reference no: EM13464072

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 function should randomly select locations for the prizes, select a door at random chosen by the contestant, 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 this 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?

Reference no: EM13464072

Questions Cloud

Draw the uml diagram for the class and then implement the : draw the uml diagram for the class and then implement the class. write a program that creates two rectangles objects
Apply durkheims four functions of deviance to deviant : describe an example of a television program that you believe clearly displays social deviance and explain why you
Assess crowdsourcing in regard to the legal societal and : crowdsourcing in the field of interface design takes tasks traditionally performed by specific individuals and spreads
You will need to research various fortune 500 companies and : the senior vice president of human resources has just informed you that she would like for you to research various hrm
Next modify your program so that it simulates playing 10000 : you are a contestant on a game show and have won a shot at the grand prize. before you are three doors. 1000000 in cash
Explain preliminary design issues you experienced in : selectnbspa contemporary issue that is of interest to you.createnbspan attitude survey using your selected
Discuss the concept of self-fulfilling prophecy if you were : 1. explain the following diagram and present an example of how it may be applied.ucs - urucs cs - urcs - cr2. during a
Describe three instances when you would use animation in a : describe three instances when you would use animation in a powerpoint presentation. determine whether or not you
You are a respected and tenured it professor and you also : discuss 4 software or hardware problems that will render two hosts unable to use the tcpip protocol to communicate.in

Reviews

Write a Review

Other Subject Questions & Answers

  Family based on personal experience

Explain whether your personal experiences measure up to your expectations of family life? How does a conflict between your beliefs and your lived experiences impact how you perceive family life?

  Database tracks subscribing accounts-channel line-up-pricing

The database tracks subscribing accounts, cable services subscribed, channel line-up, and pricing. The following detailed information requirements need to be represented by ERD.

  Why we should continue advertising

You have been hired as the advertising manager for the Rollins tool company. In your dirt meeting with mr. Rollins, he says "advertising is a waste of money. We've been advertising for six-months now and sales have not increased. Tell me why we shoul..

  The minor typo in the amount-competitive market

A question was raised about the minor "typo" in the amount to be paid to the supplier of office furniture and equipment.  The contract states that the supplier will be paid $350,000.00 for furniture and equipment that was later estimated to worth onl..

  Wat is the difference between an express and an implied

what is the difference between an express and an implied contract? a unilateral and a bilateral contract? a contract

  Assume constant atmospheric pressure

What is the pressure 300 ft below the surface of a mountain lake, if the surface of the mountain lake is 10,000 feet above sea level? (assume constant atmospheric pressure)

  Cartesian dualism and associationism

Explain the central tenets of the "Cartesian Dualism" doctrine. Help explain the impact of the "Cartesian Dualism" doctrine on the formation of psychology as a formal discipline of study.

  Explain role of economics-family-religion in suicide bombers

Study the difference between male and female suicide bombers. Consider how economics, religion, family and society play role in these differences.

  Integrated approach to tourism policy

decrease poverty in SIDS, effective policy environment and play a strong regulatory role in developing sustainable tourism policies, utmost benefits from tourism growth

  The descriptive study

The descriptive study,  A causal research design is typically concerned with,  The recommended minimum time spent in test market.

  Dominating-problem-solving and avoiding

Which of the following best describes Michael Eisner's and Bob Iger's approaches to resolving conflict: Dominating, Problem-solving, Avoiding, or Accommodating? Provide a detailed explanation of the conflict-handling style.

  Product development strategy

Based on what you read in the case what do you think Kandy Kastle's new product development strategy is? Why do you think the development of the Hello Kitty product line is so important?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd