From 1f967b2f451e8e1898edabd5af4401fceae2e915 Mon Sep 17 00:00:00 2001 From: Bohdan Romanov Date: Wed, 30 Oct 2024 20:21:18 +0200 Subject: [PATCH 1/3] Solution --- app/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index 37b9f338..e613d444 100644 --- a/app/main.py +++ b/app/main.py @@ -1,3 +1,2 @@ def count_occurrences(phrase: str, letter: str) -> int: - # write your code here - pass + return phrase.lower().count(letter.lower()) From c3f2d8bfc8f0996ffee66920a07349c6863d1a9a Mon Sep 17 00:00:00 2001 From: Bohdan Romanov Date: Wed, 30 Oct 2024 22:27:45 +0200 Subject: [PATCH 2/3] same variant --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index e613d444..61587011 100644 --- a/app/main.py +++ b/app/main.py @@ -1,2 +1,2 @@ def count_occurrences(phrase: str, letter: str) -> int: - return phrase.lower().count(letter.lower()) + return phrase.lower().count(letter.lower()) \ No newline at end of file From 3ab9fbbf4685295d5de9adf41e31fb5571886420 Mon Sep 17 00:00:00 2001 From: Bohdan Romanov Date: Wed, 30 Oct 2024 22:30:39 +0200 Subject: [PATCH 3/3] Solution --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 61587011..e613d444 100644 --- a/app/main.py +++ b/app/main.py @@ -1,2 +1,2 @@ def count_occurrences(phrase: str, letter: str) -> int: - return phrase.lower().count(letter.lower()) \ No newline at end of file + return phrase.lower().count(letter.lower())