This part you will be defining a function called‘bbqFood’ that will take in a object and return an array. Thedictionary contains party foods as the keys and the number ofpeople that food can feed at the party as the corresponding values.The array you return will be the keys that have values that aregreater than 10, meaning that food can feed more than 10people.
Examples:
bbqFood({‘taco’:15, ‘hamburger’:6, ‘pasta’:42,‘fruit’:23}) must return [‘taco’, ‘pasta’, ‘fruit’]
bbqFood({‘pizza’:3, ‘beans’:6, ‘hot dog’:4, ‘cake’:2,‘pie’:5}) must return [ ]
Solution
def bbqFood(d): keys = [] for k, v in d.items():
OR
OR