From 95df154abc3815899eca1361f711c8600eaded04 Mon Sep 17 00:00:00 2001 From: Dmytro Okliuk Date: Fri, 10 Jan 2025 14:51:08 +0100 Subject: [PATCH] Solution --- app/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index 37b9f338..65f9691d 100644 --- a/app/main.py +++ b/app/main.py @@ -1,3 +1,6 @@ def count_occurrences(phrase: str, letter: str) -> int: - # write your code here - pass + counter = 0 + for count in phrase: + if count.upper() == letter.upper(): + counter += 1 + return counter