PDA

View Full Version : Python (x,y) Help



nosejam
10-13-2008, 08:47
Already been answered

I've started a programming module this semester and looking for help with Python (x,y) coding.

It will be specifically based on the uses of it that scientists use it for. Here is my first question;

First consider evaluating the sum:

http://img399.imageshack.us/img399/3240/92040849et9.png

Since we know the number of terms, we can use a for loop. Note that if you try to do this using integer arithmetic on the computer you will get the wrong answer.

Need some help here, I have an idea how to do it using a while loop, but don't know how to do it with a for loop. If you could explain the answer as well that would be nice as well lol.