Reversing survey scores

Fill in the blanks · Basic · §10.2 A building loop in one line

In a survey answered on a scale of 1 to 5, a reverse-worded question is scored by subtracting each answer from 6. A 5 becomes a 1, and a 4 becomes a 2. Print the new list with every answer converted, and then its average. In Blank 1, write a list comprehension, including the square brackets. In Blank 2, write an expression that gives the count to divide by.

Code with blanks

answers = [5, 4, 1, 3, 4]
flipped = ____
average = sum(flipped) / ____
print(flipped)
print(average)

Solve this problem in your browser

Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.