1)could you please propose a suitable data structure to store above ploynomials.
2) and, how to add & multiply them using python codes.
It looks like homework. Did you try to add the polynomials in a python console ?
As Gribouilis said, there is only so much we can suggest without doing the work for you. As for data structures, there are three options I can recommend, in order from least preferred to most:
I would probably choose version two, as it probably would be the easiest for handling the arithmetic. I would wrap that representation in a
Polynomial class to make the arithmetic operations part of the whole structure.
would be ...
9*x**6 + 2*x**4 + 2*x + 5
You could store it as a string and design a little parser to pick it appart.
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.
Private Sub btn_addline_Click(ByVal ...
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
OK, so HostGator for some reason no longer allows gcc/g++ access unless you have a Designated Server account, which is a lot of money to spend just to compile my "Hello World" program. Thus I figured I'd compile at home, then upload. Program is your regular old bare-bones Hello World ...