Question: In Python # Item namedtuple definition used for the next two functions # Name is the name of an item, price is the price of
In Python # Item namedtuple definition used for the next two functions # Name is the name of an item, price is the price of an item in dollars, and # purchased is the number of items sold. from collections import namedtuple Item = namedtuple("Item", "name price purchased")
def unpopularItems(listOfItems):
''' (20 points) Function that takes in a list of Items. Returns a new list of items containing the items that had 0 purchases. - Note: We've seen something similar to this in the last lab. Think of using .append to add items to your resulting list when the amount purchased is 0. '
'' return "stub"
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
