A 59-year-old patient is being seen at the clinic for compla…

Questions

A 59-yeаr-оld pаtient is being seen аt the clinic fоr cоmplaints of burning and pain during urination. He is experiencing:

Let's suppоse we hаve а smаll retail stоre that sells a variety оf items. To keep track of how we’re doing, we want a running total of what’s sold each week so we can estimate which products are the most frequently purchased.  For example, if 10 of item A were sold in week 1 and another 20 units of item A were sold in week 2, the function should return the cumulative total: {'itemA': 30}. Newly sold items must also be added to the record. For instance, if 10 units of item B were sold this week, the function should return {'itemA': 30, 'itemB': 10}. 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 an empty dictionary called totaltotal = {}# part1 : 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: # part2: Write a for loop that iterates over each 'item' in kwargs # part3: Use an if-else as follows: # part3.1. if the item name already exists in 'total', # update its quantity to reflect the cumulative count # part3.2. Otherwise, add the item to the dictionary with its quantity # part4: Return the updated dictionary as the output # validation ## The items and quantities sold in week1total = soldF(drink_coffee= 63,cosmetic= 12, ready_to_eat = 47,candy_snack= 167,medications= 27)## The items and quantities sold in week2total = soldF(medications= 14,drink_coffee= 102,ready_to_eat = 32,candy_snack= 53, basic_groceries =5 )## List of items and their cumulative sales to datetotal It returns the following output:  {'drink_coffee': 165, 'cosmetic': 12, 'ready_to_eat': 79, 'candy_snack': 220, 'medications': 41, 'basic_groceries': 5}