Skip to main content
deleted 37 characters in body
Source Link
Champo
  • 3.2k
  • 1
  • 17
  • 19

Python - 211179

h=input()*2
d=hj=d=h/4
q='|'
e='q,e,u,p,k="| '\n+/"
w=e*d
u='\n'
s='+'+'s=p+'-'*h+'+'
y=e+w+s+u'*h+p
i=''
o=e+w+s+u
v=q+e*h+q
for l inwhile range(0,d)j:y+=e*o+=e*j+k+e*h+k+e*(d-lj)+'/'+e*h+'/'+e*l+q+u;i+=v+e*(d-l+q+u;j-1)+'/'+u=1;i+=v+e*j+k+u
print y+s+w+q+u+''.joino+s+w+q+u+([v+w+q+u]*v+w+q+u)*(d-1))+v+w+'+'+u+i+s+v+w+p+u+i+s

I'd like to note that I took some ideas from JPvdMerwe (Using a string to print once, and the one-liner for that I didn't know was correct syntax in Python).

Python - 211

h=input()*2
d=h/4
q='|'
e=' '
w=e*d
u='\n'
s='+'+'-'*h+'+'
y=e+w+s+u
i=''
v=q+e*h+q
for l in range(0,d):y+=e*(d-l)+'/'+e*h+'/'+e*l+q+u;i+=v+e*(d-l-1)+'/'+u
print y+s+w+q+u+''.join([v+w+q+u]*(d-1))+v+w+'+'+u+i+s

I'd like to note that I took some ideas from JPvdMerwe (Using a string to print once, and the one-liner for that I didn't know was correct syntax in Python)

Python - 179

h=input()*2
j=d=h/4
q,e,u,p,k="| \n+/"
w=e*d
s=p+'-'*h+p
i=''
o=e+w+s+u
v=q+e*h+q
while j:o+=e*j+k+e*h+k+e*(d-j)+q+u;j-=1;i+=v+e*j+k+u
print o+s+w+q+u+(v+w+q+u)*(d-1)+v+w+p+u+i+s

I'd like to note that I took some ideas from JPvdMerwe (Using a string to print once, and the one-liner for that I didn't know was correct syntax in Python).

deleted 516 characters in body
Source Link
Champo
  • 3.2k
  • 1
  • 17
  • 19

Python - 211

h=input()*2
d=h/4
q='|'
e=' '
w=e*d
u='\n'
s='+'+'-'*h+'+'
y=e+w+s+u
i=''
v=q+e*h+q
for l in range(0,d):y+=e*(d-l)+'/'+e*h+'/'+e*l+q+u;i+=v+e*(d-l-1)+'/'+u
print y+s+w+q+u+''.join([v+w+q+u]*(d-1))+v+w+'+'+u+i+s

I'd like to note that I took some ideas from JPvdMerwe (Using a string to print once, and the one-liner for that I didn't know was correct syntax in Python)


First version - Python - 256

n = int(raw_input())
d=n/2
h=n*2
q='|'
e=' '
w=e*d
s='+'+'-'*h+'+'
r=range
print e+w+s
for l in r(d,0,-1):
 print e*l+'/'+e*h+'/'+e*(d-l)+q
print s+w+q
v=q+e*h+q
for l in r(d+1,n):
 print v+w+q
print v+w+'+'
for l in r(0,d):
 print v+e*(d-l-1)+'/'
print s

I'm sure there's a couple of stuff that can be done better, I'm gonna be trying to improve it later on today.

Python - 211

h=input()*2
d=h/4
q='|'
e=' '
w=e*d
u='\n'
s='+'+'-'*h+'+'
y=e+w+s+u
i=''
v=q+e*h+q
for l in range(0,d):y+=e*(d-l)+'/'+e*h+'/'+e*l+q+u;i+=v+e*(d-l-1)+'/'+u
print y+s+w+q+u+''.join([v+w+q+u]*(d-1))+v+w+'+'+u+i+s

I'd like to note that I took some ideas from JPvdMerwe (Using a string to print once, and the one-liner for that I didn't know was correct syntax in Python)


First version - Python - 256

n = int(raw_input())
d=n/2
h=n*2
q='|'
e=' '
w=e*d
s='+'+'-'*h+'+'
r=range
print e+w+s
for l in r(d,0,-1):
 print e*l+'/'+e*h+'/'+e*(d-l)+q
print s+w+q
v=q+e*h+q
for l in r(d+1,n):
 print v+w+q
print v+w+'+'
for l in r(0,d):
 print v+e*(d-l-1)+'/'
print s

I'm sure there's a couple of stuff that can be done better, I'm gonna be trying to improve it later on today.

Python - 211

h=input()*2
d=h/4
q='|'
e=' '
w=e*d
u='\n'
s='+'+'-'*h+'+'
y=e+w+s+u
i=''
v=q+e*h+q
for l in range(0,d):y+=e*(d-l)+'/'+e*h+'/'+e*l+q+u;i+=v+e*(d-l-1)+'/'+u
print y+s+w+q+u+''.join([v+w+q+u]*(d-1))+v+w+'+'+u+i+s

I'd like to note that I took some ideas from JPvdMerwe (Using a string to print once, and the one-liner for that I didn't know was correct syntax in Python)

added 481 characters in body
Source Link
Champo
  • 3.2k
  • 1
  • 17
  • 19

Python - 211

h=input()*2
d=h/4
q='|'
e=' '
w=e*d
u='\n'
s='+'+'-'*h+'+'
y=e+w+s+u
i=''
v=q+e*h+q
for l in range(0,d):y+=e*(d-l)+'/'+e*h+'/'+e*l+q+u;i+=v+e*(d-l-1)+'/'+u
print y+s+w+q+u+''.join([v+w+q+u]*(d-1))+v+w+'+'+u+i+s

I'd like to note that I took some ideas from JPvdMerwe (Using a string to print once, and the one-liner for that I didn't know was correct syntax in Python)


First version - Python - 256

n = int(raw_input())
d=n/2
h=n*2
q='|'
e=' '
w=e*d
s='+'+'-'*h+'+'
r=range
print e+w+s
for l in r(d,0,-1):
 print e*l+'/'+e*h+'/'+e*(d-l)+q
print s+w+q
v=q+e*h+q
for l in r(d+1,n):
 print v+w+q
print v+w+'+'
for l in r(0,d):
 print v+e*(d-l-1)+'/'
print s

I'm sure there's a couple of stuff that can be done better, I'm gonna be trying to improve it later on today.

Python - 256

n = int(raw_input())
d=n/2
h=n*2
q='|'
e=' '
w=e*d
s='+'+'-'*h+'+'
r=range
print e+w+s
for l in r(d,0,-1):
 print e*l+'/'+e*h+'/'+e*(d-l)+q
print s+w+q
v=q+e*h+q
for l in r(d+1,n):
 print v+w+q
print v+w+'+'
for l in r(0,d):
 print v+e*(d-l-1)+'/'
print s

I'm sure there's a couple of stuff that can be done better, I'm gonna be trying to improve it later on today.

Python - 211

h=input()*2
d=h/4
q='|'
e=' '
w=e*d
u='\n'
s='+'+'-'*h+'+'
y=e+w+s+u
i=''
v=q+e*h+q
for l in range(0,d):y+=e*(d-l)+'/'+e*h+'/'+e*l+q+u;i+=v+e*(d-l-1)+'/'+u
print y+s+w+q+u+''.join([v+w+q+u]*(d-1))+v+w+'+'+u+i+s

I'd like to note that I took some ideas from JPvdMerwe (Using a string to print once, and the one-liner for that I didn't know was correct syntax in Python)


First version - Python - 256

n = int(raw_input())
d=n/2
h=n*2
q='|'
e=' '
w=e*d
s='+'+'-'*h+'+'
r=range
print e+w+s
for l in r(d,0,-1):
 print e*l+'/'+e*h+'/'+e*(d-l)+q
print s+w+q
v=q+e*h+q
for l in r(d+1,n):
 print v+w+q
print v+w+'+'
for l in r(0,d):
 print v+e*(d-l-1)+'/'
print s

I'm sure there's a couple of stuff that can be done better, I'm gonna be trying to improve it later on today.

added 1 characters in body; edited body
Source Link
Champo
  • 3.2k
  • 1
  • 17
  • 19
Loading
Source Link
Champo
  • 3.2k
  • 1
  • 17
  • 19
Loading