Николай обнови решението на 07.03.2014 22:40 (преди над 10 години)
+def wow_such_much(start,end):
+ if start > end:
+ return list()
+
+ my_list = list(range(start, end))
+
+ for i in range(0, end - start):
+ if my_list[i] % 3 == 0 and my_list[i] % 5 == 0:
+ my_list[i] = 'suchmuch'
+ elif my_list[i] % 3 == 0:
+ my_list[i] = 'such'
+ elif my_list[i] % 5 == 0:
+ my_list[i] = 'much'
+ else:
+ my_list[i] = str(my_list[i])
+
+ return my_list
+
+
+def count_doge_words(my_string):
+ new_list = my_string.split()
+ dogie_words = ('wow', 'such', 'much', 'so', 'lol', 'very')
+ dogie_counter = 0
+
+ for i in new_list:
+ if i in dogie_words:
+ dogie_counter += 1
+
+ return dogie_counter