diff --git a/app/main.py b/app/main.py index 37b9f338b..9a6dbb647 100644 --- a/app/main.py +++ b/app/main.py @@ -1,3 +1,9 @@ def count_occurrences(phrase: str, letter: str) -> int: - # write your code here - pass + """ + Count occurrences of a letter in a phrase (case insensitive). + + :param phrase: The phrase to search within. + :param letter: The letter to count occurrences of. + :return: The number of occurrences of the letter in the phrase. + """ + return phrase.lower().count(letter.lower())