Answers for "polynomial in python"

1

polynomial in python

def p(x):
    return x**4 - 4*x**2 + 3*x
 
for x in [-1, 0, 2, 3.4]:
    print(x, p(x)) 
#-1 -6
#0 0
#2 6
#3.4 97.59359999999998
Posted by: Guest on September-17-2021

Python Answers by Framework

Browse Popular Code Answers by Language