diff --git a/src/text_score.py b/src/text_score.py index 8776f8d..f23180c 100644 --- a/src/text_score.py +++ b/src/text_score.py @@ -5,9 +5,9 @@ # Every time the first string occurs in the text, you will # increment the score count, and every time the second string # occurs, you will decrement the score count. Return the final score. -# Example: +# Example: # input: ("I love to eat hot dogs for breakfast, hot dogs for lunch, and even for dinner!", "hot", "for") # output: -1 def text_score(message, positive_word, negative_word): - pass \ No newline at end of file + return message.count(positive_word) - message.count(negative_word)