[Tutor] Memory error - how to manage large data sets?

Karthik rs.karthick at gmail.com
Mon Jul 28 17:56:41 CEST 2008


Hi,

 

I am new to Python programming, I was trying to work out a few problems in
order to grasp the knowledge gained after going through the basic chapters
on Python programming. I got stuck with a memory error.

 

Following is what I did,

 

1.     I need to find the sum of all numbers at even positions in the
Fibonacci series upto 2 million.

2.     I have used lists to achieve this.

3.     My program works good with smaller ranges. Say till 10,000 or even
100,000. However when I compute the sum for bigger ranges it gives me the
memory error.

4.     Also could someone tell me how to get the result in the form of an
exponent. For instance, I would prefer 10^5 rather  100000.

 

Thanks in advance,

Karthik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080728/da6963ab/attachment.htm>


More information about the Tutor mailing list