9. You are a class teacher at a kindergarten school. As a task, you asked your students to write a paragraph. Unfortunately, you notice that most of the students did not use capital letters correctly. Your task is to write a function which takes a string as its only parameter and returns a new copy of the string that has been correctly capitalized. Your function should: Capitalize the first letter in the string • Capitalize the first letter after a full-stop, exclamation mark or question mark • Capitalize the word "i" if it is in lowercase. Summary: You have to write a function that reads a string from the user and capitalizes. The string is then returned and displayed.

icon
Related questions
Question

Write it in python

9. You are a class teacher at a kindergarten school. As a task, you asked your
students to write a paragraph. Unfortunately, you notice that most of the students
did not use capital letters correctly. Your task is to write a function which takes a
string as its only parameter and returns a new copy of the string that has been
correctly capitalized. Your function should:
• Capitalize the first letter in the string
• Capitalize the first letter after a full-stop, exclamation mark or question mark
• Capitalize the word "i" if it is in lowercase.
Summary: You have to write a function that reads a string from the user and
capitalizes. The string is then returned and displayed.
Transcribed Image Text:9. You are a class teacher at a kindergarten school. As a task, you asked your students to write a paragraph. Unfortunately, you notice that most of the students did not use capital letters correctly. Your task is to write a function which takes a string as its only parameter and returns a new copy of the string that has been correctly capitalized. Your function should: • Capitalize the first letter in the string • Capitalize the first letter after a full-stop, exclamation mark or question mark • Capitalize the word "i" if it is in lowercase. Summary: You have to write a function that reads a string from the user and capitalizes. The string is then returned and displayed.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer