Константин обнови решението на 11.03.2014 23:15 (преди над 10 години)
+#!/usr/bin/python3.3
+import re
+
+def wow_such_much(start, end):
+ doge_list = []
+ for i in range(start, end):
+ a = i/3 - i//3
+ b = i/5 - i//5
+ if a == 0 and b == 0:
+ doge_list.append("suchmuch")
+ elif a == 0:
+ doge_list.append("such")
+ elif b == 0:
+ doge_list.append("much")
+ else:
+ doge_list.append(repr(i))
+ return(doge_list)
+
+
+def count_doge_words(sentence):
+ words = ['wow', 'lol', 'so', 'such', 'much', 'very']
+ words_found = []
+ all_words = re.findall(r'\w+', sentence)
+ i = 0
+ for word in words:
+ if word in all_words:
+ i += 1
+ return (i)