Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
Ranked #31.8K
~21.1K People Reached
Favorite Forums
Favorite Tags

3 Posted Topics

Member Avatar for vegaseat

[code=python] def wordReplace(sentList, wordDict): find = lambda searchList, elem: [[i for i, x in enumerate(searchList) if x == e] for e in elem] wordList = list(wordDict) wordInd = find(sentList,wordList) for i in wordList: for k in range(len(wordInd)): for j in wordInd[k]: sentList[j] = wordDict[i] return "".join(sentList) [/code] This is probably …

Member Avatar for Gribouillis
0
20K
Member Avatar for SureEM25

Okay, I will help you out. First off, have you heard of the rational root theorem? If you have just use that if not here is an explanation. Given an arbitrary polynomial, the possible roots of that polynomial are +/- p/q where p is an integer factor of the constant …

Member Avatar for wallars
1
184
Member Avatar for sneekula

1 is not prime: [code=python] def isPrime(n): if n == 1: return 0 else: for x in range(2,int(n**0.5)+1): if n%x == 0: return 0 return 1 [/code] Here is a shorter primeList: [code=python]primeList = lambda n: set([i for i in range(2,n)]) ^ set([i for i in range(2,n) for x in …

Member Avatar for wallars
0
1K

The End.