Kodewick
Start learning →
Starter←→0 / 100

Passing scores

#049StarterListsLoops3 min

The quiz has been marked. Write passing(scores) to return a new list with only the scores of 60 or more, in the same order. If nobody passed, return an empty list.

Examples
passing([72, 45, 60, 98])→[72, 60, 98]
passing([30, 59])→[]
main.py
def passing(scores):
    kept = []
    for s in scores:
        # your code here: 60 or more goes into kept
        pass
    return kept
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.