Question: Create a MATLAB script called HW_5p2_Task1_UCusername.m that will: - Prompt the user to enter the number of rounds n, and the name of each player.

Create a MATLAB script called HW_5p2_Task1_UCusername.m that will: - Prompt the user to enter the number of rounds n, and the name of each player. - Determine the Driver and the Follower, and keep track of the score for each player - Display the winner for each round - Display the winner after n-rounds and the number of points for each player. Use the following MATLAB function to simulate a roll of a die: X=randi([1,6],1). The function will randomly output an integer between 1 and 6 . Test Case: Note: the points will vary each time the code is executed since the rolling of the dice is generated using a random generator. Enter Player 1 name: John Doe Enter Player 2 name: Jane Doe The number of attempts n=6 The driver is Jane Doe, the follower is John Doe The winner of the round 1 is Jane Doe The winner of the round 2 is Jane Doe The winner of the round 3 is John Doe The winner of the round 4 is Jane Doe The winner of the round 5 is John Doe The winner of the round 6 is Jane Doe The winner of the game is Jane Doe The points for Jane Doe is 4 The points for John Doe is 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
