Kodewick
Start learning →
Basic←→0 / 80

Spelling bee results

#073BasicComprehensionsSorting5 min

The spelling bee is over, and scores is {name: words spelled right}. Write bee_report(scores): from highest to lowest, make one line per child, 'name: score' (a space after the colon), and return the list of lines. No two scores are the same.

Examples
bee_report({"Lily": 7, "Omar": 9, "Ivy": 4})→['Omar: 9', 'Lily: 7', 'Ivy: 4']
bee_report({})→[]
main.py
def bee_report(scores):
    # your code here: sort the names by score, highest first, into ranked
    ranked = []
    # your code here: in one line, make the list of 'name: score' and return it
    return []
Ctrl + Enter runs too
Result

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