Q:

Write a NumPy program to compute the following polynomial values

0

Write a NumPy program to compute the following polynomial values.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import numpy as np
print("Polynomial value when x = 2:")
print(np.polyval([1, -2, 1], 2))
print("Polynomial value when x = 3:")
print(np.polyval([1, -12, 10, 7, -10], 3))

Sample Output:

Polynomial value when x = 2:                                           
1                                                                      
Polynomial value when x = 3:                                           
-142

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now