Question: MATLAB problem! Homework 6 - Conditionals Function Name: lovePentagram Inputs 1. 2. (char) Name of first competitor (char) Name of second competitor Outputs: 1. (char)

 MATLAB problem! Homework 6 - Conditionals Function Name: lovePentagram Inputs 1.2. (char) Name of first competitor (char) Name of second competitor Outputs:

MATLAB problem!

Homework 6 - Conditionals Function Name: lovePentagram Inputs 1. 2. (char) Name of first competitor (char) Name of second competitor Outputs: 1. (char) A sentence describing who wins the game Background: Valentine's Day is coming up, and a group of friends are trying to find dates Unfortunately, they all have their eyes set on the same crush- MATLAB. It looks like they will have to settle it will an intense game of rock paper scissors Function Description their bae by comparing two strings given as inputs. The ONLY inputs we will use to test your Write a MATLAB function that will determine who is worthy enough to claim MATLAB as function are: Chad', 'Brad, 'Drew', 'Kyle', 'Mike', and 'No-show' Then compare them according to the following rules Chad' beats both 'Brad' and 'Kyle' . Brad' beats both 'Kyle' and 'Mike' . 'Mike' beats both'Drew' and'Chad' . Kyle' beats both 'Mike' and 'Drew' . 'Drew' beats both'Chad' and'Brad' . If one of the inputs is 'No-show', then that means that person didn't show up, and the other competitor wins by default. After determining who wins, output one of the following strings . If there is a winner winner beats > winner lovePentagram('Kyle', 'Brad') = winner Brad beats Kyle! He has proven his worth to MATLAB. Notes: The competitors will never be both no-shows. No competitor will ever face themself. Hint: Switch statements may prove useful

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!