Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/text_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
return message.count(positive_word) - message.count(negative_word)