[Solved] How to print values in a dictionary that fall below a certain percentage? [closed]


There is the working code

quiz_scores = {
    'Corbin': [92, 66, 88, 91, 100, 95, 94],
    'Kevin': [100, 99, 100, 98, 95, 98, 99],
    'Hannah': [79, 67, 78, 81, 70, 55, 74],
    'Ben': [94, 88, 85, 100, 91, 79, 88],
    'Yasaswini': [99, 90, 88, 91, 89, 95, 94],
    'Veda': [79, 97, 88, 82, 70, 95, 94],
    'Jack': [59, 67, 74, 91, 70, 75, 56]
}

print({name: [score for score in scores if score < 70] for name, scores in quiz_scores.items() if min(*scores) < 70})

And sample output

> python run.py
{'Corbin': [66], 'Hannah': [67, 55], 'Jack': [59, 67, 56]}

solved How to print values in a dictionary that fall below a certain percentage? [closed]