Cody

Problem 44358. I Plead the Fifth

Solution 3702088

Submitted on 17 Nov 2020
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)))

Error in solution: Line: 10 Column: 54 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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'))

Error in solution: Line: 10 Column: 54 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution: Line: 10 Column: 54 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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'))

Error in solution: Line: 10 Column: 54 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

5   Fail
question = 'Do you like bread?'; assert(strcmpi(I_plead_the_fifth(question),'yes') || ... strcmpi(I_plead_the_fifth(question),'no'))

Error in solution: Line: 10 Column: 54 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

6   Fail
question = 'Are there five fingers on your right hand?'; assert(isempty(I_plead_the_fifth(question)))

Error in solution: Line: 10 Column: 54 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

7   Fail
question = 'Do you like pumpkins?'; assert(strcmpi(I_plead_the_fifth(question),'yes') || ... strcmpi(I_plead_the_fifth(question),'no'))

Error in solution: Line: 10 Column: 54 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution: Line: 10 Column: 54 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution: Line: 10 Column: 54 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution: Line: 10 Column: 54 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

11   Fail
question = 'Is my name Harry?'; assert(strcmpi(I_plead_the_fifth(question),'yes') || ... strcmpi(I_plead_the_fifth(question),'no'))

Error in solution: Line: 10 Column: 54 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!