A short story

Report a typo

Please note: for now, when you go to the tab IDE, you can solve this problem only via Pycharm. We are sorry for the inconvenience, we will fix this as soon as we can. If you prefer to solve the problem via a different IDE, you should open it manually and then copy the solution to the website.

Tom Black is an unknown author. He started writing short stories when he was a schoolboy. His short stories usually consist of four sentences, and, what's more, each story has an unpredictable average sentiment score. He is likely to become a famous writer soon!

Your task is to download one of his short stories, calculate the sentiment score for each sentence and find the average sentiment score of the whole story.

The average sentiment score is calculated as follows:
Sentiment score=SN\text{Sentiment score}= {S \over N}where SS is a sum of all the sentiment scores, and NN is the total number of the sentences in a story.

Write code in your IDE to process the text file and display the results below
___

Create a free account to access the full topic