Challenge
Sort by a field
…the cargo manifest heaviest first with a key function and reverse=True.
5 results
Challenge
…the cargo manifest heaviest first with a key function and reverse=True.
Challenge
…readings from highest to lowest, in place, with sort(reverse=True) , then print the three highest with a slice: Highest three: [455.2, 430.1, 412.5] Don't store what sort() gives back.
Challenge
…a type error, a wrong key, an index out of range and a reversed decision. Read each error to fix the four that crash, then find the one that runs but gives the wrong answer.
Challenge
…add undo, which takes the last change off the history and reverses it.
Challenge
…kg (3%) spares: 2.4 kg (2%) sorted(totals, key=totals.get, reverse=True) gives the categories ordered by their totals. sum(totals.values()) is the whole load.