Dessign the function compra(llista, diners) which, given a list llista of prices of articles and a quantity of diners in euros, returns the number of articles that can be bought with this miney following the order in which they appear in the list. Whenever an article cannot be bought it will be left out. The solution must take into account that no article costs less than 10 euros.
>>> compra([100, 125], 55) 0 >>> compra([50, 50, 30, 20, 40], 125) 3 >>> compra([200, 15, 15] + 100*[20], 30) 2 >>> compra([50, 10, 10, 10, 10, 10, 10, 80], 60) 2