Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HELP ASAP PLEASE This is the Monty Hall problem. I wanna create a simple program with java or any other language to do the following:

HELP ASAP PLEASE This is the Monty Hall problem. I wanna create a simple program with java or any other language to do the following:

design a program to do the following:

Ask the user for how many doors the game should start with.

Ask the user for how many games to play.

Use a random number generater to play the game however many times the user wants to play. ACTUALLY simulate the game, do not just calculate what you think the answer should be.

Display the number of games the user would win using the strategy of NOT swapping doors

Display the number of games the user would win using the strategy OF swapping doors.

Give a summary of the calculated probabilities of using each strategy.

here is an example output:

How many doors in your game? 3 How many games do you want to play? 1000 If you didn't swap doors, you would have won 384 games. That is 38.4% of the time If you DID swap doors, you would have won 616 games. That is 61.6% of the time.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago