Search Results

Showing results 1 to 8 of 8
Search took 0.01 seconds.
Search: Posts Made By: arsham
Forum: Getting Started and Choosing a Distro Nov 29th, 2007
Replies: 8
Views: 15,761
Posted By arsham
Forum: Python Jun 3rd, 2007
Replies: 38
Views: 10,384
Posted By arsham
Thanks
You are right
Must be :

if 0 not in map(lambda x: i % x, myarray[0:int(sqrt(len(myarray)))+1]):
myarray.append(i)


a sqrt(x)+1 must be in test
Forum: Python Jun 2nd, 2007
Replies: 2
Views: 1,627
Posted By arsham
My friend
I used to work with eclipse , but didn't satisfy me...
After I worked with Zend Studio ( for PHP ) and WingIde ( for PYTHON ) , it made me learn faster.
IMO wingide is a good choice ,...
Forum: Python Jun 2nd, 2007
Replies: 38
Views: 10,384
Posted By arsham
Thanks all for replies
I tested this one , no non-primes there , and x+1 is for the 49 problem :


myarray = [2,3]
from math import sqrt
def prime(x):
for i in xrange(3, x+1,2):
...
Forum: Python Jun 1st, 2007
Replies: 38
Views: 10,384
Posted By arsham
How this one compared to the other?


myarray = [2,3]

from math import sqrt
def prime(x):
for i in xrange(3, x,2):
if filter(lambda x: i % x,...
Forum: Python Jun 1st, 2007
Replies: 7
Solved: primes
Views: 2,000
Posted By arsham
I was thinking of the smallest code
This must go to sqr(x) while checking for being divide by x
So in that situation , this would be faster

Looking forward to see better solution

Good job...
Forum: Python May 31st, 2007
Replies: 7
Solved: primes
Views: 2,000
Posted By arsham
myarray = [2,3]

def prime(x):
for i in range(3, x,2):
if filter(lambda x: i % x, myarray) == myarray :
myarray.append(i)
Forum: Python May 31st, 2007
Replies: 38
Views: 10,384
Posted By arsham
myarray = [2,3]

def prime(x):
for i in range(3, x,2):
if filter(lambda x: i % x, myarray) == myarray :
myarray.append(i)
Showing results 1 to 8 of 8

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC