how to compute polynomial equation in python