Capitalize Sentence Starts
text is made of lowercase letters, spaces and periods. A sentence starts at the first letter of text and at the first letter after each period; any spaces in between are skipped over. Return text with the first letter of every sentence changed to uppercase and everything else unchanged.
A period that is not followed by any letter (for example the last character) starts no sentence. Spaces and periods are never changed, and there may be several periods in a row.
Example 1
hello starts the text and this is the first letter after the period, so both get a capital.
Example 2
There is no space after the period, so two starts right after it.
Constraints
0 <= len(text) <= 60texthas lowercase letters, spaces and periods only
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.