Upload a Python source file (.py) that defines a function na…

Upload a Python source file (.py) that defines a function named only_small_values. This function will take two lists of integer values as parameters. It will return a new list in which we have the smallest values of the two original lists, when compared pairwise (explanation of what this means below). If the two lists are not of the same size, we will return an empty list. Similarly, if the lists are empty then we will return an empty list too. If at any point during your work on these lists, you discover a negative integer value, you will make sure that your function also returns an empty list. Let’s explain in more details what we mean by “compared pairwise”. Given two lists [0, 9, 2, 8] and [4, 9, 1, 4] that have the same length, we start by looking at the first elements of each list (that is 0 and 4). We keep the smallest one (that is 0) and put it as first element of a list that we will end up returning. We then move on to the 2nd elements of each list (that is 9 and 9) and keep again the smallest (here it is 9 either way) and add it at the end of the list that we will end up returning. We keep going like this, keeping the value 1 for the 3rd element and 4 for the last element. Examples:  only_small_values( [0, 9, 2, 8] , [4, 9, 1, 4] ) will return [0, 9, 1, 4] only_small_values( [0, 0, 0] , [9, 9, 9] ) will return [0, 0, 0] only_small_values( [9, 9, 9] , [0, 0, 0] ) will return [0, 0, 0] only_small_values( [0, 9, 2, 8] , [4, 9, 1, 4, 5] ) will return [ ] only_small_values( [0, 9, 2, 8, 5] , [4, 9, 1, 4] ) will return [ ] only_small_values( [ ] , [ ] ) will return [ ] only_small_values( [ ] , [1, 2, 3 ] ) will return [ ] only_small_values( [1, 2, 3 ] , [ ] ) will return [ ] only_small_values( [ 1, 2, 3, 4] , [ 1, 2, -3, 4] ) will return [ ] only_small_values( [1, -2, 3, 4] , [1, 2, 3, 4] ) will return [ ] You are free to add more code to the global scope of your file in order to call your function to test it. This part will not be graded but will help you ensure that your function performs as expected. Grading Rubric: 0.75 point for returning an empty list when the two parameter lists have different lengths 0.75 point for returning an empty list when at least one of the two parameter lists is empty 1 point for correctly iterating over both lists simultaneously 1 point for correctly identifying the smallest value in each pair 1 point for correctly creating the list to be returns by adding one element at a time 2.5 points for passing each of the tests above (0.25 each)

Upload a Python source file (.py) that defines a function na…

Upload a Python source file (.py) that defines a function named affordable. This function will take as parameters a list of dictionaries and a float representing our spending budget, in dollars. This list contains dictionaries that each hold information about an ebay auction. The function will then return a single dictionary that will contain the information for the items which price is below our budget limit. We will, however, format this information differently: the key will be the name of the item and its corresponding value will be its price. See the examples below. Let us start by putting the following code in your global scope: auctions = [ { ‘name’ : ‘Atari Falcon 030’, ‘price’ : ‘499.99’ }, { ‘name’ : ‘Raspberry PI 400’, ‘price’ : ‘50.45’ }, { ‘name’ : ‘Lenovo T480’, ‘price’ : ‘200.59’ }, { ‘name’ : ‘Clockworks DevTerm’, ‘price’ : ‘259.95’ }, { ‘name’ : ‘HP DevOne’, ‘price’ : ‘759.85’ } ] As you can see, the dictionaries in our list contain both the name of the items being listed (a string value corresponding to the key ‘name’ in that item’s dictionary) and the price of the item (a string value corresponding to the key ‘price’ in that item’s dictionary). We want our function to return a dictionary in which the keys are the names of the items (we’ll have to avoid adding the items which name is already used as a key in the dictionary) and the values are their respective price, as a float. Please note that only the items that we can afford will make it to this dictionary. We can afford an item if its price is below the budget that we set as 2nd parameter. With the example above, calling our function on the auctions variable would return a dictionary structured as follows: >>> affordable(auctions, 300.0){   ‘Raspberry PI 400’ : 50.45 ,   ‘Lenovo T480’ : 200.59 ,   ‘Clockworks DevTerm’ : 259.95 } Here is another example: >>> affordable(auctions, 51.0){   ‘Raspberry PI 400’ : 50.45 } If we call our function with a negative budget or with an empty dictionary of auctions, our function will return an empty list: >>> affordable(auctions, -300.0){}>>> affordable( [] , 300.0){} Of course if there are no affordable items, we also return an empty list. >>> affordable( [ { ‘name’ : ‘ouch’, ‘price’ : ‘9999.99’ } ] , 300.0){} Here is an example where we have two items with the same name in our list of auctions. The function should add the first one but not the second one since its name is already used as a key in the resulting dictionary: auctions = [ { ‘name’ : ‘Atari Falcon 030’, ‘price’ : ‘499.99’ }, { ‘name’ : ‘Raspberry PI 400’, ‘price’ : ‘50.45’ }, { ‘name’ : ‘Lenovo T480’, ‘price’ : ‘200.59’ }, { ‘name’ : ‘Raspberry PI 400’, ‘price’ : ‘49.95’ },    { ‘name’ : ‘Clockworks DevTerm’, ‘price’ : ‘259.95’ }, { ‘name’ : ‘HP DevOne’, ‘price’ : ‘759.85’ } ] >>> affordable(auctions, 300.0){   ‘Raspberry PI 400’ : 50.45 ,   ‘Lenovo T480’ : 200.59 ,   ‘Clockworks DevTerm’ : 259.95 } Notice how the “Raspberry PI 400′ has been added only once to the resulting dictionary. The auction that was added is the first one that appeared in the list parameter. You are free to add more code to the global scope of your file in order to call your function to test it. This extra code will not be graded but will help you ensure that your function performs as expected. Grading Rubric: The function creates an empty dictionary named result to start off with (1 point) The function correctly iterates over all the dictionaries of the list given as parameter  (1 point) The function correctly detects items that are affordable (1 point) The function correctly adds these items to the result dictionary (1 point) The function correctly avoids adding the items which name has already been previously added in the dictionary (duplicates in the list parameter) (1 point) The function correctly returns an empty dictionary if no item is affordable (1 point) The function correctly returns an empty dictionary if it is given an empty list of dictionaries (1 point) The function correctly returns an empty dictionary if it is given a negative budget amount (1 point)

In a resting typical person, there is Mean Arterial Pressure…

In a resting typical person, there is Mean Arterial Pressure (MAP) being detected by the baroreceptors. The baroreceptors have a resting frequency of afferent action potentials to the brainstem nuclei: parasympathetic CI, sympathetic CA and VM. At rest, the baroreceptors ensure that parasympathetic CI is ON, sympathetic CA is OFF, and sympathetic VM is half on. If a drug blocked the production of baroreceptor action potentials in a resting typical person, what effect would there be relative to baseline activity?

A nurse is talking to parents who are currently expecting th…

A nurse is talking to parents who are currently expecting their first child. They have just received news that their child has Type II Osteogenesis Imperfecta (OI). The nurse will consider the following information when discussing the prognosis for this pregnancy. This form of OI:

The parent of a 5 year old has brought their child in to get…

The parent of a 5 year old has brought their child in to get an immunization that did not happen at their visit last month because the clinic was out of stock. Besides that one immunization, the patient has been up to date on her immunizations. The parent remembers the patient received DTap, IPV, COIVD, Flu and MMR but can not remember the other immunization that she were supposed to get. Based on the recommended immunization schedule for a 4-6 year old you suspect the needed immunization is: 

A parent wants to know why their child needs the Mumps vacci…

A parent wants to know why their child needs the Mumps vaccine. Per the parent, Mumps is uncommon in their area and from what he has heard resolves on it’s own without medication. As the nurse you educate the parent on the following known complications of mumps:

We are running a phenobarbital level on Mary Garcia. She has…

We are running a phenobarbital level on Mary Garcia. She has a history of seizures and arrives unconscious at the ED. The instrument reported a result of >135 mg/dL.  A dilution should be performed in order to get a result that is within the reportable range.  What dilution will you perform?

A 6 year old child has just been diagnosed with fifths disea…

A 6 year old child has just been diagnosed with fifths disease in the clinic. The patient presented afebrile, with mild symptoms of runny nose, and headache, as well as a rash bilaterally on cheeks. The parent asks you when it is okay for the child to return to school. The best response would be: