Question: Homework 06-Conditionals Function Name: civilkar Inputs: 1. 2. (char) Player 1's move (char) Player 2's mowe Outputs: 1. (char) A statement descibing which player wor

 Homework 06-Conditionals Function Name: civilkar Inputs: 1. 2. (char) Player 1'smove (char) Player 2's mowe Outputs: 1. (char) A statement descibing which

Homework 06-Conditionals Function Name: civilkar Inputs: 1. 2. (char) Player 1's move (char) Player 2's mowe Outputs: 1. (char) A statement descibing which player wor Background: You and your friends decide to play but immediately get bored. Then you remember Marvel's new movie Black Panther is almost in theaters and decide to spruce up the classic game to include your favorite Avengers. Once you agree upon the rules, you write a MATLAB functon to determine the winner of each round. Function Description: Write a tunction that takes in and compares two of the following strings. These are the ONLY inputs we will use to test your function Captain Aterica Black Widow Hawkeye Black Panther Iron Man Then compare them by the folowing rules (look on the following page for a graphic) 1. Black Panther beats both Captain America and Hawkeye. 2. Captain America beats both Iron Man and Black Widow 3. ron Man beats both Black Panther and Hawkeye. 4. Hawkeye beats both Captain America and Black Widow. 5. Black Widow beats both Black Panther and Iron Man. It should output one of the following strings: Player 1 wins! if player 1 wins Player 2 wins! if player 2 wins It' s a tie!' if both players choose the same move

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!