From 42d91174ff279d7efafce1f641a6492b0a85e90f Mon Sep 17 00:00:00 2001 From: Julie Phan Date: Wed, 7 Mar 2018 18:36:20 -0500 Subject: [PATCH] fixes #53 --- src/text_score.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)