Problem 1712. NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the output is 0. For example:
Sentence = 'The birds in the field are eating bird seed'; Not_allowed = 'field'
so the output will be, because field is found in the sentence:
Output = 1;
Another example:
Sentence = 'If the sky is blue on earth, what is the sky color on mars?'; Not_allowed = 'oven'
so the output will be, because oven is not found in the sentence:
Output = 0;
That is it!
Have Fun!
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers193
Suggested Problems
-
Program an exclusive OR operation with logical operators
705 Solvers
-
466 Solvers
-
Natural numbers in string form
1250 Solvers
-
857 Solvers
-
898 Solvers
More from this Author17
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!