Finally I seem to have pulled myself together and started following the instructions of the Python MOOC, which officially begins on 17 June, but has already started sending some tasks for preparation. And they actually turned out to be rather instructive for me. For instance, after about a month of toying with Codecademy, I had a very vague idea of how to work with IDLE. I mean, I tried it, but it didn’t make much sense and I didn’t get into details, because I was quite happy with Codecademy Labs at my disposal. And I also found out that IDLE stands for “Integrated DeveLopment Environment” (but still I suspect it has something to do with Eric Idle from Monty Python Flying Circle). Also, I know there are several versions of Python, but I still can’t understand what it really means. Well, hopefully, I’ll find out later. Right now I had to install Python 2.6 (instead of 3.0 I installed previously), according to the course requirements.

What has been a really bad experience so far is the way to calculate square root by way of raising a number to the 0.5-th power. This procedure just won’t fit into my mind. Not yet anyway.

Now, I’ll just post here some links in order to save them:

- MIT OCW Introduction to Python and IDLE (.pdf)
- A very simple and helpful instruction about how to start using IDLE
- Python Tutor: a mailing list for Python fans, as far as I understood
- Python for Beginners: a wiki-type resource
- And a wonderful lecture by John Guttag (the introductory part of MIT OCW programming course) Btw, the video currently doesn’t work properly at YouTube, so it might be a better way to simply download it or to watch in browser.

Python 3.3 is the latest stable version, but it appears 2.x is still the most commonly used. It is possible to do the Codecademy exercises using python 3.3, but there are some things that require doing something else than shown in the exercise examples. A print function is used in 3.3 as opposed to a print statement in 2.6 for example. For this MOOC, however, it might be best for everyone to use the same version to allow easier peer-to-peer feedback and less confusion.

As for the square root, python has a sqrt function in its math module. But if you want a cube root or Nth root, it is much easier to raise a number to the 1/nth power. And 0.5 is 1/2 which is the squared root.

As to Python versons, it makes sense now, especially thanks to the example with print statement/function (I’ve only dealt with print as a statement yet though). Thanks!

As to math.sqrt() I knew about that (from Codecademy), but what actually puzzled me, is that I can’t imagine the operation of raising something to 1/nth power. I mean, to raise 3 to the second power, I just multiply 3*3. Similarly, to raise it to the 3rd power, I multiply it 3 times: 3*3*3. And so on. Now I’m trying to understand how I can multiply something 1/n times.

Ah I see, sorry for misunderstanding. I took a refresher course on maths a few months ago and I faced the same issue/urge to understand. I found ways to calculate these operations without a calculator. It’s like doing a “long division”. An example for such a method to calculate a square root can be found here. I’m just going to keep using a calculator though. 🙂

Well, in fact it was a very helpful remark about using 1/n power to calculate roots other than square.

And thanks for the link about calculating roots. Yesterday thaks to the lecture I mentioned I learnt about the trial and improvement method. Now what you shared seems more interesting, I’ll have a closer look.

And yes, calculator or at least Python is a better choice indeed. But then again I wonder what’s the mechanism behind Python’s 16 ** 0.5 operation. I mean it seems that somehow instead of multiplying 16 by itself 0.5 times it follows some algorithm similar to what you shared.