diff --git a/app/main.py b/app/main.py index 37b9f338b..4b9ddfe79 100644 --- a/app/main.py +++ b/app/main.py @@ -1,3 +1,13 @@ def count_occurrences(phrase: str, letter: str) -> int: - # write your code here - pass + """ + Count occurrences of a letter in a phrase (case insensitive). + + Parameters: + phrase (str): The string in which to search for the letter. + letter (str): The letter to count within the phrase. + + Returns: + int: The number of occurrences of the letter in the phrase. + """ + string_lower = phrase.lower() + return string_lower.count(letter.lower())