Lie Ryan wrote:
As the manpage of less explains: 'less - opposite of more'
I've always heard it explained that more is the original paging
program of UNIX, and when a new pager was created (by GNU?) they named
it less because, as we all know, less is more[1].
Simón
[1]
Lie Ryan wrote:
As the manpage of less explains: 'less - opposite of more'
I've always heard it explained that more is the original paging
program of UNIX, and when a new pager was created (by GNU?) they named
it less because, as we all know, less is more[1].
Simón
[1]
kinuthia muchane wrote:
On Tue, 2008-05-13 at 11:09 -0400, Simón A. Ruiz wrote:
When i is 3, then we'll only check (2 % 3 == 0) which is False, so the
loop ends unbroken and runs the else clause letting us know that 3 is
indeed a prime number.
Shouldn't we be checking for (3%2 == 0) instead
kinuthia muchane wrote:
On Mon, 2008-05-12 at 14:08 -0400, Simón A. Ruiz wrote:
For each of those numbers, it checks to see if any number between 2 and
i is divisible into i. If it finds anything, we know it's not a prime,
and so it breaks out of that second loop without completing it, which
I'll try my hand at this:
The outside for loop is looking through every number up to the variable
number.
For each of those numbers, it checks to see if any number between 2 and
i is divisible into i. If it finds anything, we know it's not a prime,
and so it breaks out of that second loop
I'll second that.
It's quite an interesting mental gymnastics challenge, and will get you
familiar with a lot of the modules. They also have helpful forums for
when you get stuck.
Simón
Danny Navarro wrote:
http://www.pythonchallenge.com/ is a great way to learn Python.
Danny
On Jan