Let’s suppose we have a small retail store that sells a variety of items. To track performance, we need a running total of all items sold each week so we can estimate which products are the most frequently purchased. Create a function called soldF that accepts a flexible number of arguments using **kwargs. This function should update both the name of the item sold and the cumulative quantity sold. Complete the following expression: # start with a blank dictionary ‘total’total = {}# part 1: Define a function named soldF that accepts **kwargs as its argument# Complete this function using a for loop and an if-else statement as follows: # part 2: Write a for loop that iterates over each ‘item’ in kwargs # part 3a: Use an if condition — if the item name already exists in ‘total’, # update its quantity to reflect the cumulative count # Step 3b: Otherwise, add the item to the dictionary with its initial quantity # Step 4: Return the updated dictionary as the output # validation ## The items and quantities sold in the first weektotal = soldF(drink_coffee= 63,cosmetic= 12, ready_to_eat = 47,candy_snack= 167,medications= 27)## The items and quantities sold in the second weektotal = soldF(medications= 14,drink_coffee= 102,ready_to_eat = 32,candy_snack= 53, basic_groceries =5 )total It returns the following output: {‘drink_coffee’: 165, ‘cosmetic’: 12, ‘ready_to_eat’: 79, ‘candy_snack’: 220, ‘medications’: 41, ‘basic_groceries’: 5}
The face of the refrigerator cabinet achieves a good seal wi…
The face of the refrigerator cabinet achieves a good seal with the gasket by using ____.
Ice molds in many ice makers include a heater to loosen the…
Ice molds in many ice makers include a heater to loosen the ice when the harvest phase begins.
Which mode of ventilation requires the practitioner to set t…
Which mode of ventilation requires the practitioner to set the high frequency alarm at 10 l/min greater than the patients baseline spontaneous frequency? Feature on some vents that provide a predetermined minute ventilation when the patients spontaneous breathing effort become inadequate.
Which patient is MOST hemodynamically affected by the loss o…
Which patient is MOST hemodynamically affected by the loss of preload contributed by atrial systole?
When the button is pressed on a through-the-door ice dispens…
When the button is pressed on a through-the-door ice dispenser, the ____.
The concept of perceived control refers to ________.
The concept of perceived control refers to ________.
Marcy is in a car accident. This is an example of a(n) _____…
Marcy is in a car accident. This is an example of a(n) ________ stressor.
Which medication exerts their pharmacologic effect during Ph…
Which medication exerts their pharmacologic effect during Phase 2 of ventricular muscle fiber action potential?
Match each of the terms with the phrase that best describes…
Match each of the terms with the phrase that best describes it.