add a first try
This commit is contained in:
parent
6a7a1cb8e5
commit
9bb348ff36
|
@ -1,2 +1,11 @@
|
||||||
def count_words(sentence):
|
def count_words(input_sentence):
|
||||||
pass
|
sentence = input_sentence.lower()
|
||||||
|
words = sentence.split()
|
||||||
|
result = {}
|
||||||
|
for word in words:
|
||||||
|
counter = 0
|
||||||
|
if word in words:
|
||||||
|
counter += 1
|
||||||
|
result[word] = counter
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
Loading…
Reference in New Issue