Question: WTITE A MATLAB SCRIPT FOR THE FOLLOWING: Consider a simple Pick 3 lottery. You pick 3 numbers between 1 and 10, repeats allowed. Then a

WTITE A MATLAB SCRIPT FOR THE FOLLOWING:

Consider a simple Pick 3 lottery. You pick 3 numbers between 1 and 10, repeats allowed. Then a compute generates 3 numbers and if they all match, you win. Pick3 numbers and write a script that simulates playing the Pick 3 lottery with your 3numbers 1000000 times. Your script should compute the number of times you match all three numbers (order matters; matching only occurs if they are in the same position).Print a how many times you matched all three (using integers) as well as the ratio (as a percent to 2 decimal places). You should compare your winning ratio to the advertised ratio of 1 in 1000.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!