Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
def count_occurrences(phrase: str, letter: str) -> int:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function implementation is missing the docstring that is required by the task description. Please add the provided docstring to document the function's purpose, parameters, and return value.

# 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())