Cody

# Problem 43325. Count given word x in text.

Solution 2021509

Submitted on 14 Nov 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
text = 'When you finish the test, you will be told approximate English level. You can then search for suitable content on LearnEnglish Teens by level. You can also search for content by topic.'; x='you'; y_correct = 2; assert(isequal(Repeat(x,text),y_correct))

ans = 1

Unrecognized function or variable 's'. Error in Repeat (line 3) s = lenght(s) Error in Test1 (line 4) assert(isequal(Repeat(x,text),y_correct))

2   Fail
text = 'when you go you are active, when you run you are active, when you sleep you are lazy'; x='when'; y_correct = 3; assert(isequal(Repeat(x,text),y_correct))

ans = 1

Unrecognized function or variable 's'. Error in Repeat (line 3) s = lenght(s) Error in Test2 (line 4) assert(isequal(Repeat(x,text),y_correct))