Question: Complete the capitalize_beginning_of_sentences(text) function that takes a single string parameter text. This parameter will consist of one or more sentences, where each sentence ends with
Complete the capitalize_beginning_of_sentences(text) function that takes a single string parameter text. This parameter will consist of one or more sentences, where each sentence ends with a full stop (""), a question mark (t?) or an exclamation mark (!) The function should return a new string where the first word of each sentence in text has its first letter capitalized. You can assume that there is always a single space character between each sentence and each word in text. You can also assume that all alphabetical characters in text will be in lowercase and it is not empty. Some examples of the function being called are shown below. For example: Test Result text - "hello class. Good luck with the exan!" Hello class. Good luck with the exam print(capitalize_beginning of sentences(text)) text = "hi hol hi ho? It's hone from work we go." Hi ho! Hi ha? It's home from work we go print(capitalize_beginning of sentences (text)) Answer: (penalty regime: 0, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50 %) Reset answer 1 def capitlize_cach_word (text): 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
