Question
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
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