Problem 43325. Count given word x in text.

Solution 1065564

Submitted on 28 Nov 2016 by goc3
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
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 = 2

2   Pass
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 = 3