Problem 129. All capital?
Are all the letters in the input string capital letters?
Examples:
'MNOP' -> 1 'MN0P' -> 0
Solution Stats
Problem Comments
-
8 Comments
Make your checks robust to brute force approach.
You should add more checks to the test suite.
I agree with Oleg and Gaik: please have a rich test suite.
You should include a test case with a string that contains lowercase letters as well as uppercase letters, numbers, and symbols.
It is not checking lowercase letters. Give some test for that.Otherwise problem statement should be different.
I added a test for lowercase.
the description of the problem is misspecified. "Are all the letters in the input string capital letters?" Numbers are not letters. The tests treat numbers as lower case.
Test cases are not according to problem statement.
Solution Comments
Show commentsProblem Recent Solvers648
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15528 Solvers
-
Count from 0 to N^M in base N.
235 Solvers
-
Back to basics 13 - Input variables
266 Solvers
-
Matrix indexing with two vectors of indices
722 Solvers
-
Convert a vector into a number
599 Solvers
More from this Author100
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!