From 6ce77ca11caa23600251621283c4bb4d6bf91065 Mon Sep 17 00:00:00 2001 From: Lukasz Date: Sun, 5 Jan 2025 17:07:39 +0100 Subject: [PATCH] 'Solution' --- app/main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 37b9f338..4944d430 100644 --- a/app/main.py +++ b/app/main.py @@ -1,3 +1,9 @@ def count_occurrences(phrase: str, letter: str) -> int: - # write your code here + counter = 0 + + for character in phrase: + if character.lower() == letter.lower(): + counter += 1 + + return counter pass