I have followed all Testing Procedures of showing my work area and any scratch paper to be used.
Select ‘confirm’ when you have finished writing your report….
Select ‘confirm’ when you have finished writing your report. Once you are ready to submit your report, click ‘submit’ in the bottom right corner (please note, once you have clicked submit you will NOT be able to go back or amend your report).
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 and 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( , ) will return only_small_values( , ) will return only_small_values( , ) will return only_small_values( , ) will return only_small_values( , ) will return only_small_values( , ) will return only_small_values( , ) will return only_small_values( , ) will return only_small_values( , ) will return only_small_values( , ) 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 = 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){} 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 = >>> 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)
You regularly see a patient at your clinic and have collecte…
You regularly see a patient at your clinic and have collected their baseline values which are measured as seen in the figure below. Then, this patient develops a brain stem glioma (tumor) that destroys their cardioinhibitory center. Given the direct effects this pathology has on MAP, which of the following statements correctly describes the reflex compensation that the baroreceptor reflex will initiate?
CHALLENGE QUESTION: As the temperature of a reaction is incr…
CHALLENGE QUESTION: As the temperature of a reaction is increased, the rate of the reaction increases because the ________.
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 6-year-old child has a cast applied for a fractured radius…
A 6-year-old child has a cast applied for a fractured radius. The nurse completes an orthopedic assessment on this child. Which of the following symptoms requires immediate attention and should be reported to the health care provider?
Match the symptoms and nursing support to the medical diagno…
Match the symptoms and nursing support to the medical diagnosis