def process(fruits, quantities, prices): i = 0 output- () for fruit in fruits: for qty in quantities: for price in prices: output.append( (fruit, qty, price)) į += 1 return output option A: def...


[no. 15]


def process(fruits, quantities, prices):<br>i = 0<br>output- ()<br>for fruit in fruits:<br>for qty in quantities:<br>for price in prices:<br>output.append( (fruit, qty, price))<br>į += 1<br>return output<br>option A:<br>def process(fruits, quantities, prices):<br>groceries = zip(fruits, quantities, prices)<br>return groceries<br>option B:<br>def process(fruits, quantities, prices ):<br>i = 0<br>output = (1<br>for fruit in fruits:<br>temp qty = quantities[i]<br>temp price - prices[i]<br>output.append( (fruit, temp_qty, temp_price))<br>i += 1<br>return output<br>option C:<br>

Extracted text: def process(fruits, quantities, prices): i = 0 output- () for fruit in fruits: for qty in quantities: for price in prices: output.append( (fruit, qty, price)) į += 1 return output option A: def process(fruits, quantities, prices): groceries = zip(fruits, quantities, prices) return groceries option B: def process(fruits, quantities, prices ): i = 0 output = (1 for fruit in fruits: temp qty = quantities[i] temp price - prices[i] output.append( (fruit, temp_qty, temp_price)) i += 1 return output option C:
Given the following lists, how would you create a new list that matches the desired output?<br>fruits = ['Apples', 'Oranges', 'Bananas']<br>quantities = [5, 3, 4]<br>prices = [1.50, 2.25, 0.89]<br>%3D<br>#Desired output<br>[[ 'Apples', 5, 1.50),<br>( 'Oranges', 3, 2.25),<br>('Bananas', 4, 0.89)]<br>

Extracted text: Given the following lists, how would you create a new list that matches the desired output? fruits = ['Apples', 'Oranges', 'Bananas'] quantities = [5, 3, 4] prices = [1.50, 2.25, 0.89] %3D #Desired output [[ 'Apples', 5, 1.50), ( 'Oranges', 3, 2.25), ('Bananas', 4, 0.89)]

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here