From 26d905d0e5c3ddf62e2e90f55831075f692c173b Mon Sep 17 00:00:00 2001 From: Gabriel Dornas Date: Wed, 14 Aug 2024 18:02:59 -0300 Subject: [PATCH] Add pythomatiza 10 examples --- 010/main.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 010/main.py diff --git a/010/main.py b/010/main.py new file mode 100644 index 0000000..0c43de3 --- /dev/null +++ b/010/main.py @@ -0,0 +1,8 @@ +def count_letters(letter, input_word): + # TODO: Retorne o número de letras (letter) no texto informado (string) + # ou 0 caso não haja nenhuma correspodência + count = 0 + for item in input_word: + if item == letter: + count +=1 + return count