Re: Python!

There's a good tutorial at http://www.nerdparadise.com/tech/coding/python/beginners1/. And also, Google is your best friend in Python. I've learned an unbelievably large amount of Python just by searching Google for what I don't know.

Re: Python!

Re: Python!

Ahh, help!

I was going through this tutorial: http://docs.python.org/tutorial/index.html

And I quickly realized that I was using 3.0 and the tutorial is written for 2.6. I didn't think that was that big of a deal, but as it turns out, it is. (One example I came across was that the tutorial told me to use the print function without parenthesizes, while the 3.0 required that I type print())

As I get deeper and deeper into the tutorial, it gets worse and worse.

So I guess my question is, should I find a different tutorial, or download a different version?

Thanks in advance.

Last edited by bossk171 (2009-05-19 07:49:00)

There are 10 types of people in the world, those who understand binary, those who don't, and those who can use induction.

Re: Python!

Hmm, I haven't had that problem before.*checks version*Oh shoot, I use 2.6. I recommend that you install 2.6, but you could just search google when something doesn't work.(Oh, and I'd recommend installing Python to a flash drive.)

Re: Python!

Hi gwar;

Even though mathsyperson has corrected that proggie. Your choice of algorithm is not right. That formula I believe is a spigot type algorithm. It will not evaluate pi. It is designed to get the nth binary digit of pi.

Last edited by bobbym (2009-06-23 01:20:08)

In mathematics, you don't understand things. You just get used to them.

Re: Python!

My fave algorithm is the one where you choose two random numbers (x,y) and see if they fall inside the unit circle. You won't get many digits out of it, but it sure is intuitive!

Anyway ... hello gwar, and welcome! Why not just run your first algorithm, see the results, and do some timing, etc. Then research more powerful algorithms and take it from there. Post your results here and keep us entertained

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Re: Python!

See that formula it is from the great Ramanujan. It is the best of its type. The page is maintained by the Borweins,Pflouffe and Bailey, the leaders in this field so don't be alarmed if it is intimidating.