From 808a9bf18aeea912f4e37bc6d553966be6302ff3 Mon Sep 17 00:00:00 2001 From: Atom-gnomov Date: Sun, 8 Dec 2024 13:00:12 +0200 Subject: [PATCH 1/3] task completed --- app/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 37b9f338..889be23a 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 + + phrase = phrase.lower() + letter = letter.lower() + return phrase.count(letter) pass From 91b7466552a445afdb49069299c6e29119a2ccbc Mon Sep 17 00:00:00 2001 From: Atom-gnomov Date: Sun, 8 Dec 2024 13:01:59 +0200 Subject: [PATCH 2/3] task completed --- app/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/main.py b/app/main.py index 889be23a..cc15a176 100644 --- a/app/main.py +++ b/app/main.py @@ -3,4 +3,5 @@ def count_occurrences(phrase: str, letter: str) -> int: phrase = phrase.lower() letter = letter.lower() return phrase.count(letter) + pass From 229ea646476e784c73716478231332707ac7d14f Mon Sep 17 00:00:00 2001 From: Atom-gnomov <165294590+Atom-gnomov@users.noreply.github.com> Date: Sun, 8 Dec 2024 19:08:27 +0200 Subject: [PATCH 3/3] Update main.py --- app/main.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/main.py b/app/main.py index cc15a176..deb0a1f2 100644 --- a/app/main.py +++ b/app/main.py @@ -1,7 +1,4 @@ def count_occurrences(phrase: str, letter: str) -> int: - phrase = phrase.lower() - letter = letter.lower() - return phrase.count(letter) + return phrase.lower().count(letter.lower()) - pass