Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:instant disqualification (Score 1) 648

The original code is correct except that you have to define "n" as the limit. Basically it'd be in a function like:
def primes_upto(n):

It uses the functional programming style available in python which allows single liners that can do a lot (though ideally you will split them up a bit for readability).

Slashdot Top Deals

Any given program will expand to fill available memory.

Working...