Skip to main content
deleted 30 characters in body
Source Link
Dion
  • 4k
  • 12
  • 42

[Python 2]Python 2, 104 94 89 81 79 bytes

s=n=input()
while s:print' '*s,'/ '*(n-s)+'_'*(2*s+len(`n`));s-=1
print'\/'*n,n

[Try it online!][TIO-ka21f5ec]Try it online!

Edit 1: Forgot I switched to python 2 lol

Edit 2: Thanks @ElPedro for the idea of switching to while loop!

Edit 3: Thanks @SurculoseSputum for saving 8 bytes!

Edit 4: Thanks @xnor for saving 2 bytes! [Python 2]: https://docs.python.org/2/ [TIO-ka21f5ec]: https://tio.run/##JY3BCsIwEETv@xW5bTZtqYn0UsmfCBbqQgNlG9yI@vUx4mmGx/Amf8p2SKjrcWcTDSJWjRKT5GexBK8t7Wx0zo8kBQ067XFsYWVQ6vDWWnDa7Sx2kYXookP08F9fR3TSN1ybFfjNq/29uImqhwBnmMCfvg "Python 2 – Try It Online"

[Python 2], 104 94 89 81 79 bytes

s=n=input()
while s:print' '*s,'/ '*(n-s)+'_'*(2*s+len(`n`));s-=1
print'\/'*n,n

[Try it online!][TIO-ka21f5ec]

Edit 1: Forgot I switched to python 2 lol

Edit 2: Thanks @ElPedro for the idea of switching to while loop!

Edit 3: Thanks @SurculoseSputum for saving 8 bytes!

Edit 4: Thanks @xnor for saving 2 bytes! [Python 2]: https://docs.python.org/2/ [TIO-ka21f5ec]: https://tio.run/##JY3BCsIwEETv@xW5bTZtqYn0UsmfCBbqQgNlG9yI@vUx4mmGx/Amf8p2SKjrcWcTDSJWjRKT5GexBK8t7Wx0zo8kBQ067XFsYWVQ6vDWWnDa7Sx2kYXookP08F9fR3TSN1ybFfjNq/29uImqhwBnmMCfvg "Python 2 – Try It Online"

Python 2, 104 94 89 81 79 bytes

s=n=input()
while s:print' '*s,'/ '*(n-s)+'_'*(2*s+len(`n`));s-=1
print'\/'*n,n

Try it online!

Edit 1: Forgot I switched to python 2 lol

Edit 2: Thanks @ElPedro for the idea of switching to while loop!

Edit 3: Thanks @SurculoseSputum for saving 8 bytes!

Edit 4: Thanks @xnor for saving 2 bytes!

added 52 characters in body
Source Link
Dion
  • 4k
  • 12
  • 42

[Python 2], 104 94 89 8181 79 bytes

s=n=input()
while s:print' '*s,'/ '*(n-s)+'_'*(2*s+len(`n`));s-=1
print'\/'*n,`n`n

[Try it online!][TIO-ka21f5ec]

Edit 1: Forgot I switched to python 2 lol

Edit 2: Thanks @ElPedro for the idea of switching to while loop!

Edit 3: Thanks @SurculoseSputum for saving 8 bytes!

Edit 4: Thanks @xnor for saving 2 bytes! [Python 2]: https://docs.python.org/2/ [TIO-ka21f5ec]: https://tio.run/##JY3BCsIwEETv@xW5bTZtqYn0UsmfCBbqQgNlG9yI@vUx4mmGx/Amf8p2SKjrcWcTDSJWjRKT5GexBK8t7Wx0zo8kBQ067XFsYWVQ6vDWWnDa7Sx2kYXookP08F9fR3TSN1ybFfjNq/29uImqhwBnmMCfvg "Python 2 – Try It Online"

[Python 2], 104 94 89 81 bytes

s=n=input()
while s:print' '*s,'/ '*(n-s)+'_'*(2*s+len(`n`));s-=1
print'\/'*n,`n`

[Try it online!][TIO-ka21f5ec]

Edit 1: Forgot I switched to python 2 lol

Edit 2: Thanks @ElPedro for the idea of switching to while loop!

Edit 3: Thanks @SurculoseSputum for saving 8 bytes! [Python 2]: https://docs.python.org/2/ [TIO-ka21f5ec]: https://tio.run/##JY3BCsIwEETv@xW5bTZtqYn0UsmfCBbqQgNlG9yI@vUx4mmGx/Amf8p2SKjrcWcTDSJWjRKT5GexBK8t7Wx0zo8kBQ067XFsYWVQ6vDWWnDa7Sx2kYXookP08F9fR3TSN1ybFfjNq/29uImqhwBnmMCfvg "Python 2 – Try It Online"

[Python 2], 104 94 89 81 79 bytes

s=n=input()
while s:print' '*s,'/ '*(n-s)+'_'*(2*s+len(`n`));s-=1
print'\/'*n,n

[Try it online!][TIO-ka21f5ec]

Edit 1: Forgot I switched to python 2 lol

Edit 2: Thanks @ElPedro for the idea of switching to while loop!

Edit 3: Thanks @SurculoseSputum for saving 8 bytes!

Edit 4: Thanks @xnor for saving 2 bytes! [Python 2]: https://docs.python.org/2/ [TIO-ka21f5ec]: https://tio.run/##JY3BCsIwEETv@xW5bTZtqYn0UsmfCBbqQgNlG9yI@vUx4mmGx/Amf8p2SKjrcWcTDSJWjRKT5GexBK8t7Wx0zo8kBQ067XFsYWVQ6vDWWnDa7Sx2kYXookP08F9fR3TSN1ybFfjNq/29uImqhwBnmMCfvg "Python 2 – Try It Online"

added 38 characters in body
Source Link
Dion
  • 4k
  • 12
  • 42

[Python 2], 104 94 8989 81 bytes

s=n=input()
while s:print' '*(s+1)+''*s,'/ '*(n-s)+'_'*(2*s+len(`n`));s-=1
print'\/'*n+' '+`n`'*n,`n`

[Try it online!][TIO-k9zf5o77]ka21f5ec]

Edit 1: Forgot I switched to python 2 lol

Edit 2: Thanks @ElPedro for the idea of switching to while loop!

Edit 3: Thanks @SurculoseSputum for saving 8 bytes! [Python 2]: https://docs.python.org/2/ [TIO-k9zf5o77]ka21f5ec]: https://tio.run/##JY1BCsIwEEX3c4rsJpNQaiLdKLmJYKEONFCmwYmop48p7h583vvlW9ddYlv2B5tkELFpkpSlvKoleK95Y6OX8sxS0aCz6gN5HA@UQTveO0WnfmOxs8xEVx1SgL9xG9GJ76LvU@t14A8v9nhzE7UAEc4wQTj9AAhttps://tio.run/##JY3BCsIwEETv@xW5bTZtqYn0UsmfCBbqQgNlG9yI@vUx4mmGx/Amf8p2SKjrcWcTDSJWjRKT5GexBK8t7Wx0zo8kBQ067XFsYWVQ6vDWWnDa7Sx2kYXookP08F9fR3TSN1ybFfjNq/29uImqhwBnmMCfvg "Python 2 – Try It Online"

[Python 2], 104 94 89 bytes

s=n=input()
while s:print' '*(s+1)+'/ '*(n-s)+'_'*(2*s+len(`n`));s-=1
print'\/'*n+' '+`n`

[Try it online!][TIO-k9zf5o77]

Edit 1: Forgot I switched to python 2 lol

Edit 2: Thanks @ElPedro for the idea of switching to while loop! [Python 2]: https://docs.python.org/2/ [TIO-k9zf5o77]: https://tio.run/##JY1BCsIwEEX3c4rsJpNQaiLdKLmJYKEONFCmwYmop48p7h583vvlW9ddYlv2B5tkELFpkpSlvKoleK95Y6OX8sxS0aCz6gN5HA@UQTveO0WnfmOxs8xEVx1SgL9xG9GJ76LvU@t14A8v9nhzE7UAEc4wQTj9AA "Python 2 – Try It Online"

[Python 2], 104 94 89 81 bytes

s=n=input()
while s:print' '*s,'/ '*(n-s)+'_'*(2*s+len(`n`));s-=1
print'\/'*n,`n`

[Try it online!][TIO-ka21f5ec]

Edit 1: Forgot I switched to python 2 lol

Edit 2: Thanks @ElPedro for the idea of switching to while loop!

Edit 3: Thanks @SurculoseSputum for saving 8 bytes! [Python 2]: https://docs.python.org/2/ [TIO-ka21f5ec]: https://tio.run/##JY3BCsIwEETv@xW5bTZtqYn0UsmfCBbqQgNlG9yI@vUx4mmGx/Amf8p2SKjrcWcTDSJWjRKT5GexBK8t7Wx0zo8kBQ067XFsYWVQ6vDWWnDa7Sx2kYXookP08F9fR3TSN1ybFfjNq/29uImqhwBnmMCfvg "Python 2 – Try It Online"

added 41 characters in body
Source Link
Dion
  • 4k
  • 12
  • 42
Loading
added 57 characters in body
Source Link
Dion
  • 4k
  • 12
  • 42
Loading
Source Link
Dion
  • 4k
  • 12
  • 42
Loading