File size: 487 Bytes
4f2e460
 
 
 
9732da2
79ad160
f5a1136
 
cd9d81b
af2e179
6e7bf28
 
 
 
 
 
 
79ad160
 
 
 
 
 
c8da2a2
79ad160
 
1f72f4f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import gradio as gr

def build(size=5):
    tot = size*size
    r=0

    box=[] 
    box_o=[x for x in range(size)]
    for i in range(size):box.append(box_o) 
    print(box)
    box_cent=int(tot/2)
    num_h,num_v=0,0
    for i in range(1,tot):
        box[box_cent]=i
        num_h=0-1
        box_cent+=(num_h+num_v)
        print(box)

    while r<tot:
        ro=""
        for c in range(size):
            ro+=f' {box[c+r]}'
            
        print(ro)
        r+=size

build()