Skip to main content
Commonmark migration
Source Link

#Python 2 - 184 151 146 Bytes

Python 2 - 184 151 146 Bytes

def r(n):
  n/=10
  for i in range(1,11):
    if n<0:print"%s--"%p
    elif i>9:print" %s-10-"%p
    else:p=" "*~-i;print"%s-%s-"%(p,`i`*2*n);n-=1

The last number kinda messed with me a little. I might be able to remove the second if statement if I look at it later.

EDIT: Thx to mbomb007 for removing 3 bytes. Thanks to charredgrass for the formatting tips to help remove lots and lots of bytes! :-D Thanks to TheBikingViking for helping with yet another two bytes!

#Python 2 - 184 151 146 Bytes

def r(n):
  n/=10
  for i in range(1,11):
    if n<0:print"%s--"%p
    elif i>9:print" %s-10-"%p
    else:p=" "*~-i;print"%s-%s-"%(p,`i`*2*n);n-=1

The last number kinda messed with me a little. I might be able to remove the second if statement if I look at it later.

EDIT: Thx to mbomb007 for removing 3 bytes. Thanks to charredgrass for the formatting tips to help remove lots and lots of bytes! :-D Thanks to TheBikingViking for helping with yet another two bytes!

Python 2 - 184 151 146 Bytes

def r(n):
  n/=10
  for i in range(1,11):
    if n<0:print"%s--"%p
    elif i>9:print" %s-10-"%p
    else:p=" "*~-i;print"%s-%s-"%(p,`i`*2*n);n-=1

The last number kinda messed with me a little. I might be able to remove the second if statement if I look at it later.

EDIT: Thx to mbomb007 for removing 3 bytes. Thanks to charredgrass for the formatting tips to help remove lots and lots of bytes! :-D Thanks to TheBikingViking for helping with yet another two bytes!

added 76 characters in body
Source Link
Jeremy
  • 511
  • 2
  • 8

#Python 2 - 184 151151 146 Bytes

def r(n):
  n/=10
  for i in range(1,11):
    if n<0:print"%s--"%p
    elif i>9:print" %s-10-"%p
    else:p=" "*(i"*~-1);print"%si;print"%s-%s-"%(p,str(i)*2*n`i`*2*n);n-=1

The last number kinda messed with me a little. I might be able to remove the second if statement if I look at it later.

EDIT: Thx to mbomb007 for removing 3 bytes. Thanks to charredgrass for the formatting tips to help remove lots and lots of bytes! :-D Thanks to TheBikingViking for helping with yet another two bytes!

#Python 2 - 184 151 Bytes

def r(n):
  n/=10
  for i in range(1,11):
    if n<0:print"%s--"%p
    elif i>9:print" %s-10-"%p
    else:p=" "*(i-1);print"%s-%s-"%(p,str(i)*2*n);n-=1

The last number kinda messed with me a little. I might be able to remove the second if statement if I look at it later.

EDIT: Thx to mbomb007 for removing 3 bytes. Thanks to charredgrass for the formatting tips to help remove lots and lots of bytes! :-D

#Python 2 - 184 151 146 Bytes

def r(n):
  n/=10
  for i in range(1,11):
    if n<0:print"%s--"%p
    elif i>9:print" %s-10-"%p
    else:p=" "*~-i;print"%s-%s-"%(p,`i`*2*n);n-=1

The last number kinda messed with me a little. I might be able to remove the second if statement if I look at it later.

EDIT: Thx to mbomb007 for removing 3 bytes. Thanks to charredgrass for the formatting tips to help remove lots and lots of bytes! :-D Thanks to TheBikingViking for helping with yet another two bytes!

added 49 characters in body
Source Link
Jeremy
  • 511
  • 2
  • 8

#Python 2 - 184184 151 Bytes

def r(n):
  n/=10
  for i in range(1,11):
    if n<0:
      print"%s--"%p
    elif i>9:
      print" %s-10-"%p
    else:
      p=" "*(i-1)
      print"%s;print"%s-%s-"%(p,str(i)*2*n)
      n;n-=1

The last number kinda messed with me a little. I might be able to remove the second if statement if I look at it later.

EDIT: Thx to mbomb007 for removing 3 bytes. Thanks to charredgrass for the formatting tips to help remove lots and lots of bytes! :-D

#Python 2 - 184 Bytes

def r(n):
  n/=10
  for i in range(1,11):
    if n<0:
      print"%s--"%p
    elif i>9:
      print" %s-10-"%p
    else:
      p=" "*(i-1)
      print"%s-%s-"%(p,str(i)*2*n)
      n-=1

The last number kinda messed with me a little. I might be able to remove the second if statement if I look at it later.

EDIT: Thx to mbomb007 for removing 3 bytes.

#Python 2 - 184 151 Bytes

def r(n):
  n/=10
  for i in range(1,11):
    if n<0:print"%s--"%p
    elif i>9:print" %s-10-"%p
    else:p=" "*(i-1);print"%s-%s-"%(p,str(i)*2*n);n-=1

The last number kinda messed with me a little. I might be able to remove the second if statement if I look at it later.

EDIT: Thx to mbomb007 for removing 3 bytes. Thanks to charredgrass for the formatting tips to help remove lots and lots of bytes! :-D

added 44 characters in body
Source Link
Jeremy
  • 511
  • 2
  • 8
Loading
Source Link
Jeremy
  • 511
  • 2
  • 8
Loading