Answer to Question #174737 in Python for Ravi

Question #174737

write a python program to add two polynomials.


Polynomial1 = 6x^3 + 10x^2 + 5

Polynomial2 = 4x^2 + 2x + 1


output

6x^3 + 14x^2 + 2x + 6


NOTE: Use string formatting to Display the Output


1
Expert's answer
2021-03-23T12:16:35-0400
from sympy.abc import x
p1 = 6*x**3 + 10*x**2 + 5
p2 = 4*x**2 + 2*x + 1
print(p1 + p2)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS