Cody

# Problem 44358. I Plead the Fifth

Solution 1889341

Submitted on 1 Aug 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   Fail
question = 'Are you the fifth child?'; assert(isempty(I_plead_the_fifth(question)))

Operands to the || and && operators must be convertible to logical scalar values. Error in I_plead_the_fifth (line 3) t=regexp(question,'five'||'fifth') Error in Test1 (line 2) assert(isempty(I_plead_the_fifth(question)))

2   Fail
question = 'Were you at home on the night of 24 Oct 1974?'; assert(strcmpi(I_plead_the_fifth(question),'yes') || ... strcmpi(I_plead_the_fifth(question),'no'))

Operands to the || and && operators must be convertible to logical scalar values. Error in I_plead_the_fifth (line 3) t=regexp(question,'five'||'fifth') Error in Test2 (line 2) assert(strcmpi(I_plead_the_fifth(question),'yes') || ...

3   Fail
question = 'Did you go to work on 15 Oct 1955?'; assert(isempty(I_plead_the_fifth(question)))

Operands to the || and && operators must be convertible to logical scalar values. Error in I_plead_the_fifth (line 3) t=regexp(question,'five'||'fifth') Error in Test3 (line 2) assert(isempty(I_plead_the_fifth(question)))

4   Fail
question = 'Did you go to the bowling alley last week?'; assert(strcmpi(I_plead_the_fifth(question),'yes') || ... strcmpi(I_plead_the_fifth(question),'no'))

Operands to the || and && operators must be convertible to logical scalar values. Error in I_plead_the_fifth (line 3) t=regexp(question,'five'||'fifth') Error in Test4 (line 2) assert(strcmpi(I_plead_the_fifth(question),'yes') || ...

5   Fail

Operands to the || and && operators must be convertible to logical scalar values. Error in I_plead_the_fifth (line 3) t=regexp(question,'five'||'fifth') Error in Test5 (line 2) assert(strcmpi(I_plead_the_fifth(question),'yes') || ...

6   Fail

Operands to the || and && operators must be convertible to logical scalar values. Error in I_plead_the_fifth (line 3) t=regexp(question,'five'||'fifth') Error in Test6 (line 2) assert(isempty(I_plead_the_fifth(question)))

7   Fail

Operands to the || and && operators must be convertible to logical scalar values. Error in I_plead_the_fifth (line 3) t=regexp(question,'five'||'fifth') Error in Test7 (line 2) assert(strcmpi(I_plead_the_fifth(question),'yes') || ...

8   Fail
question = 'Do you have fifteen siblings?'; assert(isempty(I_plead_the_fifth(question)))

Operands to the || and && operators must be convertible to logical scalar values. Error in I_plead_the_fifth (line 3) t=regexp(question,'five'||'fifth') Error in Test8 (line 2) assert(isempty(I_plead_the_fifth(question)))

9   Fail
question = 'Do two quarters equal fifty cents?'; assert(isempty(I_plead_the_fifth(question)))

Operands to the || and && operators must be convertible to logical scalar values. Error in I_plead_the_fifth (line 3) t=regexp(question,'five'||'fifth') Error in Test9 (line 2) assert(isempty(I_plead_the_fifth(question)))

10   Fail
question = 'Do you own five dogs?'; assert(isempty(I_plead_the_fifth(question)))

Operands to the || and && operators must be convertible to logical scalar values. Error in I_plead_the_fifth (line 3) t=regexp(question,'five'||'fifth') Error in Test10 (line 2) assert(isempty(I_plead_the_fifth(question)))

11   Fail