Question: I have a question how to do this problem in matlab. LAB ACTIVITY 23.19.1: Slot Machine (Branching) Part 3 Count the cherries This tool is

I have a question how to do this problem in matlab. I have a question how to do this problem in matlab. LAB

LAB ACTIVITY 23.19.1: Slot Machine (Branching) Part 3 Count the cherries This tool is provided by a third party. Your activity is always recorded but you may need to refresh the page to fill in the banner 0/5 Slot Machine Part 3 The double diamond slot machine game has three windows. Each window shows either a double diamond (DD), a cherry (C'), a single bar (B), double bar (BB') or triple bar (BBB'), or the number seven (7) or a blank ('0'). Write a function NumberofCherries to detect from symbols of three windows (w1,w2,w3), the number of cherries: subfunction name: NumberofCherries Inputs: w1,w2,w3 (type: string); Output: number of double diamonds (type: integer) The number of cherries result regardless of what other syymbols appears with them. The double diamond is wild and can represent any of the other signs to maximize the number of cherries. Hint: In writing branching code, instead of using the symbols, use the corresponding numbers Restriction: The function must use the custom function AssignNumber, similar to what was specified in Slotmachine Part 1. Your function can simply call the function AssignNumber For example >> out NumberofCherries('C, C, BB) out = >> out-NumberofCherries( out ,' C' , 'C' ) out-NumberofCherries('DD", C','7") Your Function Save C Reset MATLAB Documentation 1 function out-NumberofCherries (wl, w2,w3) % Your code goes here % 4 end 8% Function will have access to following custom functions: AssignNumber Code to call your function C Reset

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!