Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #78506

Re: how to parse standard algebraic notation

Date 2014-09-30 14:05 -0700
From Gary Herron <gherron@digipen.edu>
Subject Re: how to parse standard algebraic notation
References <4a7f3e7a-ba4d-405e-a078-937bf861fcd8@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.14496.1412111706.18130.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

how to parse standard algebraic notation math math <mathematisch@gmail.com> - 2014-09-30 13:53 -0700
  Re: how to parse standard algebraic notation Gary Herron <gherron@digipen.edu> - 2014-09-30 14:05 -0700
    Re: how to parse standard algebraic notation math math <mathematisch@gmail.com> - 2014-10-01 00:01 -0700
      Re: how to parse standard algebraic notation Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-10-01 08:35 +0100
      Re: how to parse standard algebraic notation Chris Angelico <rosuav@gmail.com> - 2014-10-01 18:38 +1000
        Re: how to parse standard algebraic notation math math <mathematisch@gmail.com> - 2014-10-01 05:04 -0700
      Re: how to parse standard algebraic notation Marco Buttu <marco.buttu@gmail.com> - 2014-10-01 14:22 +0200
      Re: how to parse standard algebraic notation Marco Buttu <marco.buttu@gmail.com> - 2014-10-01 14:26 +0200
  Re: how to parse standard algebraic notation Chris Angelico <rosuav@gmail.com> - 2014-10-01 10:20 +1000
  Re: how to parse standard algebraic notation wxjmfauth@gmail.com - 2014-10-01 01:08 -0700
  Re: how to parse standard algebraic notation Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-02 02:45 +1000
    Re: how to parse standard algebraic notation Chris Angelico <rosuav@gmail.com> - 2014-10-02 03:01 +1000

csiph-web