Мария обнови решението на 11.03.2014 14:20 (преди над 10 години)
+def wow_such_much(start, end):
+ numbers = [num for num in range(start, end)]
+ for i in range(0, end - start):
+ if numbers[i] % 3 == 0 and numbers[i] % 5 == 0:
+ numbers[i] = "suchmuch"
+ elif numbers[i] % 3 == 0:
+ numbers[i] = "such"
+ elif numbers[i] % 5 == 0:
+ numbers[i] = "much"
+ else:
+ numbers[i] = str(numbers[i])
+ return numbers
+def count_doge_words(statement):
+ doge_words = []
+ words = statement.split()
+ for word in words:
+ if (word == "wow" or word == "lol" or word == "so" or word == "such" or
+ word == "much" or word == "very"):
+ doge_words.append(word)
+ return len(doge_words)