From 34962b29cfec2451954a6e0b4a666b55095c61ae Mon Sep 17 00:00:00 2001 From: Woland Date: Sat, 6 Jun 2026 12:02:37 +0200 Subject: [PATCH] '' --- main.py | 10 ++++++++++ requirements.txt | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100644 main.py create mode 100644 requirements.txt diff --git a/main.py b/main.py new file mode 100644 index 0000000..1e3e6d5 --- /dev/null +++ b/main.py @@ -0,0 +1,10 @@ +def count(phrase: str, letter: str) -> int: + count = 0 + for char in phrase: + if char.lower() == letter.lower(): + count += 1 + return count + + +print(count('hello world', letter='h')) +count('hello world', letter='l') diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..afff680 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +flake8==5.0.4 +flake8-annotations==2.9.1 +flake8-quotes==3.3.1 +flake8-variables-names==0.0.5 +pep8-naming==0.13.2 +pytest==7.1.3 \ No newline at end of file