Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,14 +1,17 @@
|
|||
from __future__ import print_function, division
|
||||
|
||||
WIDTH = 81
|
||||
HEIGHT = 5
|
||||
|
||||
lines=[]
|
||||
lines = []
|
||||
|
||||
def cantor(start, len, index):
|
||||
seg = len / 3
|
||||
seg = len // 3 # from division
|
||||
if seg == 0:
|
||||
return None
|
||||
for it in xrange(HEIGHT-index):
|
||||
for it in range(HEIGHT - index):
|
||||
i = index + it
|
||||
for jt in xrange(seg):
|
||||
for jt in range(seg):
|
||||
j = start + seg + jt
|
||||
pos = i * WIDTH + j
|
||||
lines[pos] = ' '
|
||||
|
|
@ -16,9 +19,9 @@ def cantor(start, len, index):
|
|||
cantor(start + seg * 2, seg, index + 1)
|
||||
return None
|
||||
|
||||
lines = ['*'] * (WIDTH*HEIGHT)
|
||||
lines = ['*'] * (WIDTH * HEIGHT)
|
||||
cantor(0, WIDTH, 1)
|
||||
|
||||
for i in xrange(HEIGHT):
|
||||
for i in range(HEIGHT):
|
||||
beg = WIDTH * i
|
||||
print ''.join(lines[beg : beg+WIDTH])
|
||||
print(''.join(lines[beg : beg + WIDTH])) # from print_function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue