S
for i in range(1, h, 2):
print(" "*(h//2-i//2), "*"*i)
for i in range(h, 0, -2):
print(" "*(h//2-i//2), "*"*i)
Size: a a a
S
M
*
***
*****
***
*
CPU Time: 0.01 s
Memory: 7704 KB
S
M
*
***
*****
*******
*********
**********
********
******
****
**
CPU Time: 0.03 s
Memory: 7628 KB
S
M
*
***
*****
*******
*********
***********
*************
***********
*********
*******
*****
***
*
CPU Time: 0.02 s
Memory: 7664 KB
RB
from itertools import chain
for x in chain(range(side), reversed(range(side-1))):
S
from itertools import chain
for x in chain(range(side), reversed(range(side-1))):
PS
from itertools import chain
for x in chain(range(side), reversed(range(side-1))):
RB
NK
S
M
File "jdoodle.py", line 1
for _ in range(200):import random;print(random.choice('|| __'), end='')")
^
SyntaxError: EOL while scanning string literal
CPU Time: 0.01 s
Memory: 7696 KB
RB
M
_='_=%r;print (_%%_)';print (_%_)
CPU Time: 0.02 s
Memory: 7664 KB
RB
print open(__file__).read()
#py2S
M
print open(__file__).read()
#py2print open(__file__).read()
CPU Time: 0.06 s
Memory: 8152 KB
S
M
Traceback (most recent call last):
File "jdoodle.py", line 3, in <module>
print(''.join(random.sample('|| __', 8)))
File "/usr/lib/python3.7/random.py", line 321, in sample
raise ValueError("Sample larger than population or is negative")
ValueError: Sample larger than population or is negative
CPU Time: 0.02 s
Memory: 10420 KB