Your question is Count Character Occurrences. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
A QA test for a PlayStation 5 system message needs to verify how often a specific character appears in the message text. Given a string and a target character, return the number of exact, case-sensitive occurrences of that character.
Implement count_character(text, target).
text is a string containing the message to inspect.target is a string containing exactly one character, including a space or punctuation mark.text whose character equals target.P and p are different characters.def count_character(text, target):