From f6f7fb9222e3a3c287a8f69f4d0202ddc24f6e5d Mon Sep 17 00:00:00 2001 From: Illya Maznitskiy Date: Wed, 16 Aug 2023 10:54:12 +0300 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 4ccbb02b..99e78473 100644 --- a/app/main.py +++ b/app/main.py @@ -14,4 +14,10 @@ def count_occurrences(phrase: str, letter: str) -> int: :param letter: letter to find occurrences of it :return: count occurrences of letter in phrase """ - # write your code here + count = 0 + + for char in phrase: + if char.lower() == letter.lower(): + count += 1 + + return count