PYTHON use filter() function to calculate scores above averagein a list
Answer
def filter(lst): s = 0 for x in lst: s += x avg = s / len(lst) count = 0 for x in lst: if(x > avg): count += 1 return count
PYTHON use filter() function to calculate scores above averagein a list
Answer
def filter(lst): s = 0 for x in lst: s += x avg = s / len(lst) count = 0 for x in lst: if(x > avg): count += 1 return count