ElPedro
  • Member for 5 years, 6 months
  • Last seen this week
  • Germany
Print "N NE E SE S SW W NW"
26 votes

brainfuck, 142 139 131 119 bytes ++++++++++[>+++>+++++++>++++++++>+++++++++<<<<-]>>>--.<<++.>>.<-.<.>.<.>>+++++.<.<.>>.<&...

View answer
The Return of FizzBuzz
12 votes

Python 2/Python 3, 81 61 57 54 bytes -20 with thanks to @KevinCruijssen -4 with thanks to @dingledooper for the idea (prints from 1000 to 1) -3 with thanks to @Ayxan by losing an unneeded int x=...

View answer
Create a Checkbox
11 votes

HTML with JavaScript - 136 124 120 115 113 111 109 79 bytes <p style=height:20;border:solid onClick=t=this;t.innerHTML=(t.e=!t.e)?'x':''> -2 with thanks to @KritixiLithos Reduced to 79 after ...

View answer
Implementing a stack
9 votes

Python 2, 59 57 51 bytes s=[] for x in input():s=(s+[x],s[:-1])[x<1] print s Try it online!

View answer
A very long Terza Rima
9 votes

brainfuck, 51 49 bytes +++++[>+++++>+++++++++++++>++<<<-]>[>.+.-.+>.<<-] Try it online! An attempt at an explanation... +++++ #Put 5 in cell 0 ...

View answer
Draw an asterisk analog clock for hour N
9 votes

Python 2, 148 140 135 bytes -8 by deleting some leftover spaces and an unneeded newline. -5 by changing (' ','*') to ' *' a=input() b=''' * a b * 1 2 ab*12 9 9 o 3 3 87654 8 7 6 5 4''' for x ...

View answer
ASCII art is ready for take-off
8 votes

Python 2, 165 154 bytes i=input() m=["*-"+"--"*i+"*"] print"\n".join([" "*i+" |"]+[" "*(i-x)+"/ "+" "*x+"\\"for x in range(i)]+m+["|"+" o"*i+" |"]*2*i+m+[" /"+"_"*(i*2-1)+"\\"]) Try it online! -11 ...

View answer
Snowman Bowling
7 votes

Python 2, 248 243 241 226 224 223 221 210 206 200 177 bytes -5 with thanks to @Rod -15 again thanks to Rod -1 using space calculation again from Rod Looks longer due to more lines and indents but ...

View answer
Code Golf Golf Golf
7 votes

Python 2, 290 264 262 252 248 245 bytes It's not pretty and it's not short but I'm tired and its the first only Python answer. Enter shot in x,y format. Edit Golfed off 26 by redefining the way the ...

View answer
Dad jokes are fun
6 votes

IBM/Lotus Notes Formula Language, 61 62 bytes +1 because I hadn't noticed the ! at the end of the output. "Hi"+@Right(i;"I'm")+", I'm IBM/Lotus Notes Formula Language!" ...

View answer
Automate your first grade counting exercise
6 votes

Python 2, 503 499 494 490 479 bytes -5 with thanks to @JonathanAllan l='one two three four five six seven eight nine ten eleven twelve thir#four#fif#six#seven#eigh#nine#'.replace('#','teen ').split()...

View answer
Score rock-paper-scissors
6 votes

Python 2, 46 40 bytes lambda x,y:+(x!=y,-1)[x[0]+y[0]in'RPSR'] Try it online! With many thanks to @Dennis for letting me borrow his Try it online test code and for saving me 6 bytes. Edit @...

View answer
Make an ASCII bat fly around an ASCII moon
6 votes

Python 2, 299 300 290 270 bytes Golfed down to 270 having gained a bit more golfing experience. Reference implementation golfed down by 321 320 330 bytes. Not pretty or elegant. Just uses brute force ...

View answer
This is my pillow
6 votes

Python 2, 86 80 76 74 73 bytes for z in range(24):a=('/'*5+'\\'*5)*24;print((a+a[::-1])*3)[z*60:z*60+60] Could probably golf a few more off it but it's a start. Edit Saved 6 by removing some unneeded ...

View answer
Decode ascii and reversed words sentence
5 votes

Python 2, 78 bytes lambda m:' '.join(x[::-1]for x in''.join(map(chr,map(int,m.split()))).split()) Try it online! Edit changed to a Python 2 answer as the lambda is shorter than the print/input ...

View answer
Create chunks from an array
5 votes

Python 2, 39 bytes i,j=input() while j:print j[:i];j=j[i:] Try it online! Assumes that 1 chunk per line is acceptable output.

View answer
Could you make me a hexagon please?
5 votes

Python 2, 100 97 89 88 87 81 79 bytes -1 from @Flp.Tkc -6 again from @Flp -2 with thanks to @nedla2004. I was trying to find how to get rid of the second slice but didn't think of that one :) i=...

View answer
Falcon Heavy stages
5 votes

Python 2, 292 290 284 282 281 bytes i,j,d,e,x,y=input()," "," /\\ ","/ \\","| |","\__/" f=i<1 l,m,n,p,q,s=3*f*j,j*(i<3),d*f,e*f,x*f,j*(i>0) print"\n".join(([l+j+d,l+j+e]+[l+"| |"]*3+[l+"...

View answer
Integer-Digits of the Arithmetic-Tables
5 votes

Python 2, 240 231 226 224 203 202 200 197 bytes a=i=input() R=range(10) for z in R:a+=' '+`z` print a for x in R: try: d=`x` for b in R:c=eval("b%s(x*1.)"%('**',i)[i<'^']);d+=' '+(' ',`...

View answer
Count how many months are having a full 31 days by counting knuckles
5 votes

Python 2, 92 90 86 80 bytes lambda a,b,c,d:[(bin(2741)[2:]*(c+1-a))[b-1:-12+d or None].count(x)for x in'10'] Try it online! 6 more by converting to a lambda, with thanks to @math_junkie for the ...

View answer
Two roads diverged in a yellow wood (part 1)
5 votes

IBM/Lotus Notes Formula Language, 37 35 26 bytes Edit I always forget that @Like with wildcards is 2 bytes cheaper than @Contains. Edit 2 Actually doesn't need the @if as it just prints 1 or 0 ...

View answer
Automate your first grade counting exercise
5 votes

Python 3, 305 303 bytes Converted to Python 3 after advice from @nedla2004. Now also has no space between written numbers on input or output e.g. enter twentytwo l='one two three four five six seven ...

View answer
Animate finding the middle
5 votes

Python 2, 50 bytes def f(i,j=0): print' '*j+i if i:f(i[1:-1],j+1) Simple recursive function that keeps shortening the string until it disappears. Call as f('string') Output string trin ri

View answer
Invert a boolean array
5 votes

IBM/Lotus Notes Formula, 2 bytes !a Usage: Create a Notes form with two fields named a and b. a (input) = editable, number, multi-value, comma separated b (output) = computed, number, multi-value, ...

View answer
Generate this number table
4 votes

Python 2, 48 bytes r=range(1,input()+1) for x in r:print[x]*x+r[x:] Try it online! Prints a list for each row.

View answer
Multiply or Divide by n
4 votes

IBM/Lous Notes Formula Language, 92 bytes i:=n:=1;o:=0;@While(i<=a;@Set("n";@If(i<n;@Integer(n/i);i*n));@Set("o";o:n);@Set("i";i+1));o A bit lengthy and only ...

View answer
Is it really time?
4 votes

LibreOffice Calc, 43 bytes =MAX(MOD(A1,100),MOD(A1/100,100),A1/4e3)<60 Basically a blatant rip-off respectful port of @RGS excellent Python answer so go and upvote them. Only posted as I have not ...

View answer
ASCII art is ready for take-off
4 votes

IBM/Lotus Notes Formula Language, 262 246 236 bytes L:=@NewLine;M:="*"+@Repeat("-";i*2+1)+"*"+L;N:=@Repeat(" ";i+1)+"|"+L; @For(x:=0;x<i;x:=x+1;@...

View answer
How many countries are in the European Union?
4 votes

Python 2, 158 150 bytes i=int(input()[:6]);print((((((((27,28)[202002>i>201306],25)[i<200701],15)[i<200405],12)[i<199501],10)[i<198601],9)[i<198101],6)[i<197301],0)[i<...

View answer
Advent calendar
4 votes

Python 2, 231 222 216 202 197 193 189 bytes i=__import__ t=i("datetime").date.today() y=t.day d=[(((`x`,"[ ]")[x<y],"[@]")[x==y],`x`)[t.month<12or y>25]for x in i("random").sample(range(1,26)...

View answer
1
2 3 4 5
7