Skip to content

Commit

Permalink
add count occurrences loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Arsenmyron committed Nov 25, 2024
1 parent 8ebe734 commit bac07c9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
from typing import Counter


def count_occurrences(phrase: str, letter: str) -> int:
# write your code here
pass
counter = 0
for char in phrase:
if char.lower() == letter.lower:
counter += 1
return counter

0 comments on commit bac07c9

Please sign in to comment.