[Tutor] Using Python for accurate calculations

2008-05-12 Thread Gloom Demon
Hello I am working on a function which is going to calculate correlation between two given sets of numbers. Example: x=[10.0, 10.8, 11.3, 10.0, 10.1, 11.1, 11.3, 10.2, 13.5, 12.3, 14.5, 11.0, 12.0, 11.8, 13.4, 11.4, 12.0, 15.6, 13.0, 12.1] y=[0.70, 0.73, 0.75, 0.70, 0.65, 0.65, 0.70, 0.61, 0.70,

Re: [Tutor] Tutor Digest, Vol 50, Issue 9

2008-04-09 Thread Gloom Demon
Hello :-) Can someone please explain to me ho can I find out how many elements are there in one record of a list? The problem is as follows: I have a txt file from which I read data into Python. The file looks something like this: 01 bla bla bla 23,15 2345,67 02 alb alb 2,4 890,1 03 bal bla al

[Tutor] Table like array in Python

2008-03-26 Thread Gloom Demon
Hello :-) I am reading Ivan van Leiningem "Learn Python in 24 hours" and I am having problems understanding the way arrays work in Python. I used to know Pascal and arrays there were tablelike. Example (cost of something in different countries by different years) Record1 US 2006 22.10 Record2 US