Question: Function Name: jurassicPark Inputs: 1. (char) Your move 2. (char) Your sibling's move Outputs: 1. (char) A statement describing who won the game Background: Your


Function Name: jurassicPark Inputs: 1. (char) Your move 2. (char) Your sibling's move Outputs: 1. (char) A statement describing who won the game Background: Your parents have finally allowed you and your sibling to go visit your grandpa's new, revolutionary attraction... Jurassic Park, the surreal world full of dinosaurs. Once you get there, your sibling immediately wants to go see the Velociraptors! However, you, as a seasoned dinosaur expert, know that the much bigger and cooler, albeit less well-known, relative of the Velociraptor, the Utahraptor needs to be the first stop on your trip. Unable to convince each other, you two resort to a classic game of "T-rex, Velociraptor, Stegosaurus, Pterodactyl, Brachiosaurus"- it's like Rock, Paper, Scissors, but with dinosaurs! Function Description: Write a MATLAB function that will determine the winner of each round of T-rex, Velociraptor, Stegosaurus, Pterodactyl, Brachiosaurus by comparing the two strings given as inputs. These are the ONLY inputs we will use to test your function: T-rex Velociraptor Stegosaurus Pterodactyl' Brachiosaurus" Then compare them by the following rules: 1. 'T-rex' beats both 'Velociraptor' and 'Brachiosaurus" 2. 'Velociraptor' beats both 'Pterodactyl' and 'Stegosaurus 3. "Stegosaurus' beats both 'T-rex and 'Pterodactyl'. 4. "Pterodactyl' beats both 'Brachiosaurus' and'T-rex' 5. "Brachiosaurus' beats both 'Velociraptor' and 'Stegosaurus
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
