Cody

Solution 1734773

Submitted on 24 Feb 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
filetext = fileread('your_fcn_name.m'); assert(isempty(strfind(filetext,'eval'))) assert(isempty(strfind(filetext,'echo'))) assert(isempty(strfind(filetext,'switch')))

2   Fail
assert(isequal(your_fcn_name('Hello world'),5.000))

Error using erase (line 31) Not enough input arguments. Error in your_fcn_name (line 2) a=size(c,2)-size(erase(c),2) Error in Test2 (line 1) assert(isequal(your_fcn_name('Hello world'),5.000))

3   Fail
assert(isequal(your_fcn_name('The quick brown fox jumps over the lazy dog'),3.889))

Error using erase (line 31) Not enough input arguments. Error in your_fcn_name (line 2) a=size(c,2)-size(erase(c),2) Error in Test3 (line 1) assert(isequal(your_fcn_name('The quick brown fox jumps over the lazy dog'),3.889))

4   Fail
assert(isequal(your_fcn_name('Another one bites the dust'),4.400))

Error using erase (line 31) Not enough input arguments. Error in your_fcn_name (line 2) a=size(c,2)-size(erase(c),2) Error in Test4 (line 1) assert(isequal(your_fcn_name('Another one bites the dust'),4.400))

5   Fail
assert(isequal(your_fcn_name('Antidisestablishmentarianism is the longest nonscientific word in the English language'),7.700))

Error using erase (line 31) Not enough input arguments. Error in your_fcn_name (line 2) a=size(c,2)-size(erase(c),2) Error in Test5 (line 1) assert(isequal(your_fcn_name('Antidisestablishmentarianism is the longest nonscientific word in the English language'),7.700))

6   Fail
assert(isequal(your_fcn_name('I ate pudding'),3.667))

Error using erase (line 31) Not enough input arguments. Error in your_fcn_name (line 2) a=size(c,2)-size(erase(c),2) Error in Test6 (line 1) assert(isequal(your_fcn_name('I ate pudding'),3.667))

7   Fail
assert(isequal(your_fcn_name('I hate pudding'),4.000))

Error using erase (line 31) Not enough input arguments. Error in your_fcn_name (line 2) a=size(c,2)-size(erase(c),2) Error in Test7 (line 1) assert(isequal(your_fcn_name('I hate pudding'),4.000))