Python Scores Scores 25 56 79 94 99 Ve Already Found Average Average Totalscores Len Score Q37183250

PYTHON

These are the scores

scores = [25, 56, 79, 94, 99]

I’ve already found the average

average = total_scores/len(scores)
print(“Sum of all scores: ” + str(total_scores))
print(“Average: ” + str(average))

How do I make exceptions for those above the average

# use filter() to figure scores that are above average pleasehelp me write a code for inside the paranthesis

above_avg = filter()


Answer


def filter(lst): s = 0 for x in lst: s += x avg = s / len(lst) count = 0 for x in

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.