#C14985. Camel Case Validator
Camel Case Validator
Camel Case Validator
This problem requires you to determine whether a given string follows the camel case naming convention. The rules of camel case are as follows:
- The string must start with one or more lowercase letters.
- Each subsequent word (if any) must begin with an uppercase letter followed by zero or more lowercase letters.
- No spaces, digits, or special characters are allowed.
In other words, a string s is a valid camel case string if and only if it matches the regular expression in LaTeX as:
$$ ^[a-z]+(?:[A-Z][a-z]*)*$$
Your program should read an input string from standard input and print True
if it is a valid camel case string and False
otherwise.
inputFormat
The input consists of a single line containing a non-empty string s.
Note: The string may be empty, in which case it should be considered invalid.
outputFormat
Output a single line: True
if the string is in camel case, otherwise False
.
thisIsCamelCase
True