Company: Electronic arts _30oct
Difficulty: medium
Adjust Recipe Quantities Problem Description You have the ingredient list of a one-person recipe. You want to cook it for many persons (defined by nb_persons ). So, you must multiply all the quantities. The ingredient list consists of strings, each defining a specific product. They all have the following format: An integer (written with digits), defining the quantity. A space character. Some words, defining the product. Modify the string by multiplying the initial integer by nb_persons . You do not have to take care of the singular/plural of the words defining the product. These words may contain some numbers, you must not modify them. The order of the lines must be preserved. Implement the function adjust_quantities with the following signature: def adjust_quantities(nb_persons: int, ingredients: List[str]) -> List[str] Examples Example 1: Input: You want to cook a cake for 3 persons. The initial ingredient list for one person is: 2 eggs 200 grams of flour 150 grams of sugar 1 liter(s