
Bigger Price
You have a list with all available products in a store. The data is represented as a list of dicts
Your mission here is to find the most expensive products in the list. The number of products we are looking for will be given as the first argument and the list of all products as the second argument.
Input: int and list of dicts. Each dict has the two keys "name" and "price"
Output: The same format as the second input argument.
Example:
assert bigger_price( 2, [ {"name": "bread", "price": 100}, {"name": "wine", "price": 138}, {"name": "meat", "price": 15}, {"name": "water", "price": 1}, ], ) == [{"name": "wine", "price": 138}, {"name": "bread", "price": 100}] assert bigger_price( 1, [{"name": "pen", "price": 5}, {"name": "whiteboard", "price": 170}] ) == [{"name": "whiteboard", "price": 170}]
CheckiO Extensions allow you to use local files to solve missions. More info in a blog post.
In order to install CheckiO client you'll need installed Python (version at least 3.8)
Install CheckiO Client first:
pip3 install checkio_client
Configure your tool
checkio --domain=py config --key=
Sync solutions into your local folder
checkio sync
(in beta testing) Launch local server so your browser can use it and sync solution between local file end extension on the fly. (doesn't work for safari)
checkio serv -d
Alternatevly, you can install Chrome extension or FF addon
checkio install-plugin
checkio install-plugin --ff
checkio install-plugin --chromium
Read more here about other functionality that the checkio client provides. Feel free to submit an issue in case of any difficulties.