Polynomials in Python

0 votes
How do I find polynomials in Python? Is there any built-in function?
Aug 27 in Python by Fata
• 1,040 points
111 views

1 answer to this question.

0 votes

You can easily find polynomials of any degree using the poly1d() function present in NumPy.

EXAMPLE1:

from numpy import poly1d
a = poly1d([3,4])
print(a)

OUTPUT:

3 x + 4

EXAMPLE2:

a = poly1d([3,4,5,6])
print(a)

OUTPUT:

   3     2
3 x + 4 x + 5 x + 6
answered Aug 27 by Wajiha
• 1,920 points

Related Questions In Python

+3 votes
7 answers

How can I rename a file in Python?

yes, you can use "os.rename" for that. ...READ MORE

answered Mar 31, 2018 in Python by DareDev
• 6,810 points
206 views
+2 votes
2 answers

How can I create a new file in Python?

You can try the below code which ...READ MORE

answered Mar 31, 2018 in Python by anto.trigg4
• 3,420 points
122 views
+2 votes
3 answers

what is the practical use of polymorphism in Python?

Polymorphism is the ability to present the ...READ MORE

answered Mar 31, 2018 in Python by anto.trigg4
• 3,420 points
1,607 views
+2 votes
2 answers

Error while printing hello world in python.

You must be trying this command in ...READ MORE

answered Mar 31, 2018 in Python by GandalfDwhite
• 1,320 points
119 views
+2 votes
3 answers

How can I play an audio file in the background using Python?

down voteacceptedFor windows: you could use  winsound.SND_ASYNC to play them ...READ MORE

answered Apr 3, 2018 in Python by charlie_brown
• 7,720 points
2,245 views
+3 votes
5 answers

How to read multiple data files in python

Firstly we will import pandas to read ...READ MORE

answered Apr 6, 2018 in Python by DeepCoder786
• 1,720 points
2,661 views
+4 votes
6 answers

Use of "continue" in python

The break statement is used to "break" ...READ MORE

answered Jul 16, 2018 in Python by Omkar
• 67,660 points
140 views
0 votes
1 answer

Meaning of 10j in SciPy

10j in b = np.r_[3,[0]*5,-1:1:10j] means that the ...READ MORE

answered Aug 27 in Python by Wajiha
• 1,920 points
22 views
0 votes
1 answer

What is timedelta in python?

It represents a duration which is basically ...READ MORE

answered Aug 7 in Python by Wajiha
• 1,920 points
32 views
0 votes
1 answer

Slicing a list using a variable, in Python

Yes its possible. Use the following piece ...READ MORE

answered Jul 2 in Python by Wajiha
• 1,920 points
29 views