Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question(s) must be answered in MATLAB. Thank you! Slot Machine (Subfunctions and Branching) Part 5 The double diamond slot machine game has three windows. Each
Question(s) must be answered in MATLAB. Thank you!
Slot Machine (Subfunctions and Branching) Part 5 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 (o' ). Write a function isThreeABs to detect from symbols of three windows (w1,w2, w3), if in all three windows there are either single bar, double bar or triple bar Function name: IsThreeABs ; Inputs : w1,w2, w3 (type: string); Output: logical 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: >> w1='C'; W2='BB ';w3-'7'; out=ISThreeABs (w1, W2, w3 ) out a logical 0 >> W1='B'; W2: 'BB '; w3='BBB '; out=ISThreeABs (W1, W2, w3) out = logicalStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started