about | help | code help+videos | done | prefs |
Write a function sentences(text) that returns the number of sentences in the string text. A sentence may end with a period, question mark, or exclamation point. It may also end with multiple punctuation marks, such as ’!!!’ or ’?!’. You may assume the string text has length at least 1 and does not start with punctuation. sentences('Am I a sentence?!? Cut me do I not bleed!?') → 2 sentences('This. Is. Terrible. Grammar! Right?') → 5 sentences('A sentence without punctuation is no sentence at all') → 0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy