Question: Passcode check: Assign hasDigit with true (1) wherever passCode contains a digit. Otherwise, assign hasDigit with false (0). Ex: If passCode is '1 2 Go!',
Passcode check:
Assign hasDigit with true (1) wherever passCode contains a digit. Otherwise, assign hasDigit with false (0).
Ex: If passCode is '1 2 Go!', then isDigit [true, false, true, false, false, false, false].:
Your Function:
function hasDigit = FindDigit(passCode) hasDigit = 0; end
Code to call your function:
FindDigit('1 2 Go!')
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
