From a9d6e5f93b2e7c59cb8acc2a93ac127f468b3b5c Mon Sep 17 00:00:00 2001 From: Semyon Yerep Date: Tue, 9 Jan 2024 13:07:52 +0200 Subject: [PATCH] Solution --- app/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 4ccbb02b..6c0199b3 100644 --- a/app/main.py +++ b/app/main.py @@ -14,4 +14,8 @@ 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 + counter = 0 + for char in phrase: + if char.lower() == letter.lower(): + counter += 1 + return counter \ No newline at end of file