Skip to content

Commit

Permalink
'Solution'
Browse files Browse the repository at this point in the history
  • Loading branch information
Illya-Maznitskiy committed Aug 16, 2023
1 parent 0e9649d commit f6f7fb9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ def count_occurrences(phrase: str, letter: str) -> int:
:param letter: letter to find occurrences of it
:return: count occurrences of letter in phrase
"""
# write your code here
count = 0

for char in phrase:
if char.lower() == letter.lower():
count += 1

return count

0 comments on commit f6f7fb9

Please sign in to comment.