Complete the code to calculate the total cost by multiplying unit cost and quantity.
total_cost = unit_cost [1] quantityMultiplying unit cost by quantity gives the total cost.
Complete the code to calculate the average cost from a list of costs.
average_cost = sum(costs) [1] len(costs)
Average is total sum divided by number of items.
Fix the error in the code to select the minimum cost from a list.
min_cost = [1](costs)The min function returns the smallest value in a list.
Fill both blanks to create a dictionary of costs for items with cost greater than 50.
high_cost_items = {item: [1] for item, [2] in costs.items() if [1] > 50}Use cost as the value and cost as the variable for dictionary values.
Fill all three blanks to filter and create a dictionary of items with cost less than 100.
filtered_costs = { [1]: [2] for [3], cost in costs.items() if cost < 100 }The dictionary keys are item, values are cost, and the loop variable is item.
