Editor

Did Everyone Pass?

#541 · Loops · Beginner · Find and fix · 30 XP · about 4 min

all_passed(scores, pass_mark) should return True when every score in the list is at least pass_mark, and False when even one score is below it. An empty list counts as True: nobody failed.

The code in the editor has a bug. all_passed([80, 30, 95], 50) says True even though one student scored 30, and an empty class gives None instead of True.

Examples

all_passed([60, 75, 50], 50)  # returns True
all_passed([80, 30, 95], 50)  # returns False
all_passed([], 50)            # returns True

Fastest solvers

Leaderboard

First solves only, ranked by stars and then time.