GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

Author Archives: Anonymous

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

Upload a Python source file (.py) that defines a function named hadamard. This function will take a lists (of variable length) of several lists of integer (all of which have the same length) values as its only parameter. Each of these lists will represent a vector and you will return a list that is the Hadamard product of all these vectors. Please note that if even a single of the vectors has a different length, then your function will return an empty list. Reminder: The Hadamard product of two vectors A and B is a vector C in which every element at index i is the product of the elements at the same index in A and B. In other words, C[i] is equal to A[i] * B[i]. You are free to add code to your file that will call your function in order to test it. This part will not be graded but will help you ensure that your function performs as expected. Examples: hadamard( [ [1,2,3,4], [2,3,4,1], [3,4,1,2], [4,1,2,3] ] ) will return [24.0, 24.0, 24.0, 24.0] hadamard( [ [3,5,4,6], [8,3,2,5], [1,2,1,4] ] ) will return [24.0, 30.0, 8.0, 120.0] hadamard( [ [1, 2, 3, 4] ] ) will return [1.0, 2.0, 3.0, 4.0] hadamard( [ ] ) will return [] hadamard( [ [1,2,3,4] , [1,2,3] ] ) will return [] hadamard( [ [1,2,3,4] , [1,2,3,4,5] ] ) will return [] hadamard( [ [ ] ] ) will return [] hadamard( [ [ ], [ ] ] ) will return [] Grading Rubric:  4 points for passing each of the above tests (0.25 point each). Deductions will be applied if other errors are found in your programs. Please note that, to get any credit, your function must solve the problem for any input. The tests are just examples, not an exhaustive list. 

Read Details

You run a blood gas on an elderly dog having knee surgery. A…

You run a blood gas on an elderly dog having knee surgery. An arterial blood gas analysis shows the following values. pH = 7.37, PaCO2 = 43 mmHg, PaO2 = 495 mmHg, Bicarbonate = 23 mmol/L, Base excess =  -1 mmol/L. Which statement best describes this dog’s acid base status.

Read Details

George purchased an 8 percent ABC bond yielding 9 percent. H…

George purchased an 8 percent ABC bond yielding 9 percent. He purchased the bond at:  

Read Details

A 6.25 percent bond with a face value of $1000.00 has a $980…

A 6.25 percent bond with a face value of $1000.00 has a $980.00 current market price. What is its nominal  yield?

Read Details

You have your financial advisor enter a market order for 100…

You have your financial advisor enter a market order for 100 shares of Bluto stock. It is trading for $707.94 per share in the secondary market and you purchase them at that price. At the end of market close, the stock closes at $789.36 per share.  How much is the total value of your stock worth?

Read Details

A nurse teaches a patient how to administer ear drops. Which…

A nurse teaches a patient how to administer ear drops. Which statement indicates understanding?

Read Details

A patient newly diagnosed with HIV asks about prognosis. The…

A patient newly diagnosed with HIV asks about prognosis. The nurse responds:

Read Details

A patient’s ABG: pH 7.26, PaCO? 39 mmHg, HCO?? 17 mEq/L. The…

A patient’s ABG: pH 7.26, PaCO? 39 mmHg, HCO?? 17 mEq/L. The nurse knows this indicates:

Read Details

A patient with glaucoma is learning eye drop administration….

A patient with glaucoma is learning eye drop administration. The nurse should emphasize:

Read Details

A patient with a family history of aneurysms is diagnosed wi…

A patient with a family history of aneurysms is diagnosed with a 5mm Circle of Willis aneurysm. What risk factor requires the most immediate modification?

Read Details

Posts pagination

Newer posts 1 … 44,405 44,406 44,407 44,408 44,409 … 93,912 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top