10
\$\begingroup\$

Challenge

Display to the screen or write to stdout this exactly:

    **
    **
   ****
   ****
   ****
   ****
   ****
   ****
   ****
**********
**********
**********

Winning

This is , so the shortest submission (in bytes) wins.

\$\endgroup\$
3
  • 7
    \$\begingroup\$ I assume from your answer that it's fine to have trailing spaces after the lines, at least to pad to a rectangle? \$\endgroup\$
    – xnor
    Nov 14 at 20:21
  • \$\begingroup\$ My answer will be in PETSCII, which may therefore be non-competing. But I'll add it for fun anyway. \$\endgroup\$ Nov 16 at 9:50
  • 1
    \$\begingroup\$ xnor, yes you may have trailing spaces after lines \$\endgroup\$
    – lame-lexem
    Nov 17 at 1:38

36 Answers 36

1
2
2
\$\begingroup\$

Desmos Graphing Calculator, 75 74 bytes

Display to the screen, eh?

a=[1...9]
b=0a-4
c=[-2...0]
(0a,a) **
(0a,a-3) ****
(b,c) ****
(-b,c) ****

Pasting that in directly will fail because the asterisks are actually part of the label.

Try it on Desmos!

\$\endgroup\$
4
  • 1
    \$\begingroup\$ First of all, it's nice to see a Desmos golf by someone other than me once in a while, and I hope you stick around! Also, as for your actual code, Label: does not need to be included in the byte count, but the asterisks should be contained in their own line to indicate a so-called "file boundary", as mentioned in this meta post on scoring Desmos code. In this case, the expression box of the label would be considered a different "file" than that of the point, so you need a file boundary. \$\endgroup\$
    – Aiden Chow
    Nov 19 at 23:43
  • \$\begingroup\$ Also even with your current code, I am not entirely sure how you got 75 bytes. I'm getting 73 bytes. But regardless, there is the problem I mentioned above, and also the fact that (0a,a) is only labelled with **, not **** which is what you put in the code box. \$\endgroup\$
    – Aiden Chow
    Nov 19 at 23:46
  • \$\begingroup\$ Also, c=[-2...0] is shorter than c=[1...3]-3 by one byte. \$\endgroup\$
    – Aiden Chow
    Nov 19 at 23:48
  • \$\begingroup\$ Implementing all my changes gives a final byte count of 74 bytes: Try It On Desmos! \$\endgroup\$
    – Aiden Chow
    Nov 19 at 23:55
1
\$\begingroup\$

Uiua 0.2.0, 28 bytes, 22 characters

+@ ×10⋯▽2_7_3-@\0"0xϿ"

See it in action

\$\endgroup\$
1
\$\begingroup\$

C (GCC), 126 83 bytes (thanks to ceilingcat)

main(y){for(;y<14;puts("********"+(y<=9)*6+3/++y*2))printf("    **"+(y>2)+y/10*3);}

Attempt This Online!

\$\endgroup\$
0
1
\$\begingroup\$

Wolfram Language (Mathematica), 63 bytes

Uncompress@"1:eJxTTMoPCm5nYGBQAAItrRgDQyMUlpYWtZhacICPBwCDVxow"

It's a bit cheeky, but it gets the job done.

Try it online!

\$\endgroup\$
0
\$\begingroup\$

Ruby, 42 bytes

puts"    **
"*2,"   ****
"*7,("*"*10+$/)*3

Attempt This Online!

\$\endgroup\$
0
\$\begingroup\$

Python 3.8 (pre-release), 63 bytes

for i in[[4,2]]*2+[[3,4]]*7+[[0,10]]*3:print(" "*i[0]+"*"*i[1])

Try it online!

\$\endgroup\$
1
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.