Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Monkey Typing by Anna_Barys
def count_words(text, words):
liczba = 0
for k in (words):
print(k)
print(text.lower())
print(k in text.lower())
if k in text.lower():
liczba = liczba + 1
return int(liczba)
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
assert count_words("How aresjfhdskfhskd you?", {"how", "are", "you", "hello"}) == 3, "Example"
assert count_words("Bananas, give me bananas!!!", {"banana", "bananas"}) == 2, "BANANAS!"
assert count_words("Lorem ipsum dolor sit amet, consectetuer adipiscing elit.",
{"sum", "hamlet", "infinity", "anything"}) == 1, "Weird text"
Jan. 1, 2016