In Emil’s book club, each of the \(10\) members rates each book they read on a scale from \(1\) to \(5\). Emil wants to write a program to calculate the average rating for a book.
Complete the given flowchart to show the steps Emil’s program needs to follow to calculate the average (mean) rating for a book.
Emil finds that sometimes people make mistakes when typing their ratings. Modify your flowchart so that if a rating is not between \(1\) and \(5\), users have to input the \(10\) ratings again.
Modify your flowchart from part (b) so that if the average rating is over \(4\), a message is displayed that says the book is excellent.
What is the lowest possible rating that one of the book club members could give a book that could still result in a message saying the book is excellent?
In order to calculate the average rating, we first need to add the \(10\) ratings together, and then divide this value by \(10\). These steps are shown in the flowchart.
The program should check for errors right after the \(10\) ratings are inputted. If the ratings are not all between \(1\) and \(5\), then the program should return to the beginning so the user can input the \(10\) ratings again. This is shown in the flowchart.
The program needs check if the average rating is greater than \(4\) sometime after it has been calculated. In the flowchart shown, we first check if the average rating is greater than \(4\) and then output the average rating. However it is also possible to switch the order of these two steps.
If a message says the book is excellent, then it must have an average rating greater than \(4\). This means the sum of the \(10\) ratings must be greater than \(4 \times 10 = 40\). Suppose \(9\) of the members gave a rating of \(5\). Then the sum of their ratings would be \(9 \times 5 = 45\). So the remaining member could give a rating as low as \(1\) and the sum of all \(10\) ratings would still be greater than \(40\). Therefore, the lowest possible rating is \(1\).