Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 18638

A popularity-contest is a competition where the answer with the highest vote tally (upvotes minus downvotes) wins. As these are frequently closed, read the tag info and post your challenge to the sandbox first.

0
votes
Python: import itertools as t raw_input() a=[int(i) for i in raw_input().split()] a=list(t.permutations(a)) b=len(a[0])/2 c=[(d[b:],d[:b]) for d in a] d=[abs(sum(d[b:])-sum(d[:b])) for d in a] e=zip( …
answered Mar 8 '14 by ɐɔıʇǝɥʇuʎs
0
votes
Python: a=99 while a: print `a`+" bottle"+("s","")[a==1]+" of beer on the wall, ", print `a`+" bottle"+("s","")[a==1]+" of beer." if a-1: print "Take one down and pass …
answered Mar 25 '14 by ɐɔıʇǝɥʇuʎs
2
votes
Python: @type @type def f(x): return 0/0 f(0)(0) f(anything)(object) returns type(object). People tend to forget that decoraters don't always do what they seem to do ;)
answered Mar 9 '14 by ɐɔıʇǝɥʇuʎs
0
votes
Python A factorial represents how many rearrangements of a list with this number of items exist. You can use itertools for this. def factorial(input = input): permutations = __import__("itertool …
answered Apr 19 '14 by ɐɔıʇǝɥʇuʎs
0
votes
def r(a,n): return a[n:]+a[:n] Could someone please check if this actually meets the requirements? I think it does, but it I haven't studied CS (yet).
answered Mar 13 '14 by ɐɔıʇǝɥʇuʎs
1
vote
Python It's legit, I swear! eval=len print eval("2 + 2")
answered Jun 9 '14 by ɐɔıʇǝɥʇuʎs
4
votes
J ;(?.5) { 'John'; 'Jeff'; 'Emma'; 'Steve'; 'Julie' Poor Julie... Trivia: this might've been the cleanest J I've ever written...
answered Jun 16 '14 by ɐɔıʇǝɥʇuʎs
1
vote
Python 2.7: >>> a=len("four") >>> b=a+a >>> d=b+b >>> c=d-(d/d) >>> e=b+c >>> f=b/a*e-d/a >>> while a: print " ".join([str(i) for i in [a,b,c,d,e,f]]), Pretty straightforward I'd say.
answered Mar 13 '14 by ɐɔıʇǝɥʇuʎs
6
votes
Python: import antigravity causes "Hello, world!" to appear on your screen. Don't believe me? Try it out for yourself! Also, this doesn't actually use the web, it opens a browser, that might looku …
answered Mar 10 '14 by ɐɔıʇǝɥʇuʎs
1
vote
Two varients, both python, I posted for different questions: 1: print str().join([chr((~0*(~0+~0))**(~0*(~0+~0+~0))*(~0*(~0+~0+~0))**(~0*(~0+~(0)))), chr((~0*(~0+~0))**(~0*(~0+~0)) …
answered Mar 31 '14 by ɐɔıʇǝɥʇuʎs
0
votes
J This doesn't directly use a divition or a power... +~ &.: ^. or: double under ln.
answered Jan 6 '15 by ɐɔıʇǝɥʇuʎs
4
votes
Python: Pfff, who needs the numeric part of alphanumeric? from string import lowercase from string import uppercase from string import punctuation print uppercase[len(str([[[len(str())]]]))] print l …
answered Mar 10 '14 by ɐɔıʇǝɥʇuʎs
0
votes
Python: def f(b): b = `b+1` while '666' in b: b = b.replace('666','667',1) return int(b) Or: f=lambda b:int(`b+1`.replace('666','667'))
answered Apr 29 '14 by ɐɔıʇǝɥʇuʎs
7
votes
1990 - J Task 1: Hello World! 'J was made in 1990!' This reflects the typical use of J: in an REPL, this would echo the string back at you. Not very useful in general, but exactly what we want her …
answered Apr 20 '15 by ɐɔıʇǝɥʇuʎs