how to parse standard algebraic notation

Gary Herron gherron at digipen.edu
Tue Sep 30 23:05:23 CEST 2014


On 09/30/2014 01:53 PM, math math wrote:
> Hi,
>
> I am trying to learn Python while solving exercises.
>
> I want to basically write a program that inputs a polynomial in standard algebraic notation and outputs its derivative.
>
> I know that I need to get the exponent somehow, but I am not sure how to accomplish this in python (3.3)
>
> Do you have any ideas or suggestions? I don't want to use existing modules as this is meant to be a didactic experience.
>
> Regards

This depends on things you have not yet told us.

In particular -- what "standard algebraic notation"?  For x-squared: 
x**2 ?  or perhaps  x^2 ?  or something else like some Unicode 
characters or HTML to get a small superscript 2 above an x.

Once you give an example of what your input looks like, we can start 
hashing out how to read it.

Gary Herron

-- 
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418




More information about the Python-list mailing list