From 9dbb49b512dbdbccc3472caad49e928c1d38ba60 Mon Sep 17 00:00:00 2001 From: Oleksandr Movchan Date: Mon, 9 Dec 2024 14:00:48 -0500 Subject: [PATCH 1/2] 'Solution' --- app/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index 37b9f338..b23cfdd2 100644 --- a/app/main.py +++ b/app/main.py @@ -1,3 +1,7 @@ def count_occurrences(phrase: str, letter: str) -> int: - # write your code here - pass + count = 0 + for alfa in phrase: + if alfa.lower() == letter.lower(): + count += 1 + return count + From ee2bea573798f6216b91754dba7a829d2f9833a6 Mon Sep 17 00:00:00 2001 From: Oleksandr Movchan Date: Fri, 13 Dec 2024 12:15:11 -0500 Subject: [PATCH 2/2] delete blank line at end of file --- app/main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/app/main.py b/app/main.py index b23cfdd2..fe5f36f3 100644 --- a/app/main.py +++ b/app/main.py @@ -4,4 +4,3 @@ def count_occurrences(phrase: str, letter: str) -> int: if alfa.lower() == letter.lower(): count += 1 return count -