Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB Board 10 -10 -10 10 Figure 1 - 20x20 board with three concentric circles There is a 20x20 square board and there are concentric
MATLAB
Board 10 -10 -10 10 Figure 1 - 20x20 board with three concentric circles There is a 20x20 square board and there are concentric circles in the board with radii 3, 5, and 10. A dart player throws 10 darts on the board randomly, such that any place on the board can be hit with an equal chance. In this question, you will estimate how many of darts hit areas indicated by A, B, C and D in Figure Part c Calculate the Score using if-else statements: i.) Give score as 10 if the dart hits in area Cequal to 2 times. i.) Give score as 20 if the dart hits in area Cgreater than 2 but less than 5 times ili) Give score as 50 if the dart hits in area Cgreater than or equal to 5 times but less than 9 times. iv.) Give score as 100 if the dart hits in area C greater than or equal to 9 times v.) Give score as O if the dart hits in area C0 or 1 times. Display the Score. Part d Display the following message to the player based on the scores using switch-case statements: a. score is 100, display "Congratulations, you get $100" b. score is 50, display "Congratulations, you get $50" c. score is 20, display "Congratulations, you get $10" d. score is 10, display "You did not win any money, but you get free ice cream!" d. score is 0, display "You did not win any money. Wish you better luck next timeStep 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