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

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!