Are all the letters in the input string capital letters?
'MNOP' -> 1
'MN0P' -> 0
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.
Back to basics 7 - Equal NaNs
Back to basics 25 - Valid variable names
Convert a vector into a number
07 - Common functions and indexing 5
Connect blocks in a model
Given a square and a circle, please decide whether the square covers more area.
How many jokers?
given 3 sides, find area of this triangle
Predicting life and death of a memory-less light bulb
peta to nano (x-ray)
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office