subject

Apolynomial of degree n with coefficients a0, a1, a2, an is the function p(x) = a0 + a1x + a2x 2 + a3 ∗ x 3 + + an ∗ x n this function can be evaluated at different values of x. for example, if p(x) = 1 + 2x+ x 2, then p(2) = 1 + 2 ∗ 2 + 22 = 9. if p(x) = 1 + x 2 + x 4, then p(2) = 21 and p(3) = 91. write a function poly() that takes as input a list of coefficients a0, a1, a2, an of a polynomial p(x) and a value x. the function will return p(x), which is the value of the polynomial when evaluated at x. note that the usage below is for the three examples shown. > > > poly([1, 2, 1], 2) 9 > > > poly([1, 0, 1, 0, 1], 2) 21 > > > poly([1, 0, 1, 0, 1], 3) 91

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:40
Convert and simplify the following sentences to conjunctive normal form (cnf): (a) (p → (q → r)) → (p → (r → q)) (b) (p ∧ q) → (¬p ↔ q) (c) ((p → q) ∧ ¬q) → ¬p
Answers: 3
question
Computers and Technology, 22.06.2019 08:10
Technician a says that if a valve is open when a piston rises to the very top of a cylinder, the piston may actually strike the valve head and cause serious engine damage. technician b says if the camshaft is located in the engine block, then the engine is called an overhead valve engine, ohv engine, or an in-block camshaft. who is right? a. b only b. both a and b c. a only d. neither a nor b
Answers: 3
question
Computers and Technology, 22.06.2019 09:50
Assume that you have an sorted array of records. assume that the length of the array (n) is known. give two different methods to search for a specific value in this array. you can use english or pseudo-code for your algorithm. what is the time complexity for each algorithm and why?
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
What is the main benefit of minimizing the ribbon in word? more options will be accessible through customized keystrokes. more of the document will be viewable without needing to scroll. fewer controls will be accessible to the user by using the mouse. fewer editing options will be available without entering a password.
Answers: 1
You know the right answer?
Apolynomial of degree n with coefficients a0, a1, a2, an is the function p(x) = a0 + a1x + a2x 2 +...
Questions
question
Mathematics, 01.07.2019 15:30
Questions on the website: 13722361