Skip to content

Commit df4633f

Browse files
committed
Delete Test.py
1 parent 95cb17f commit df4633f

File tree

2 files changed

+15
-25
lines changed

2 files changed

+15
-25
lines changed

MS.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
row = 0
22

3-
a = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]
3+
square = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]
44

5-
col = int(len(a) / 2)
6-
a[row][col] = 1
5+
col = int(len(square) / 2)
6+
square[row][col] = 1
77

8-
for i in range(2, len(a) ** 2 + 1):
8+
for i in range(2, len(square) ** 2 + 1):
99

10-
row_next = (row - 1) % 5
11-
col_next = (col + 1) % 5
10+
rown = (row - 1) % 5
11+
coln = (col + 1) % 5
1212

13-
if a[row_next][col_next] == 0:
13+
if square[rown][coln] == 0:
1414

15-
row_next = (row - 1) % 5
16-
col_next = (col + 1) % 5
17-
a[row_next][col_next] = i
18-
row = row_next
19-
col = col_next
15+
rown = (row - 1) % 5
16+
coln = (col + 1) % 5
17+
square[rown][coln] = i
18+
row = rown
19+
col = coln
2020

2121
else:
2222

23-
a[row + 1][col] = i
23+
square[row + 1][col] = i
2424
row = row + 1
2525

26-
for s in range(len(a)):
26+
for n in range(len(square)):
2727

28-
print(a[s])
28+
print(square[n])

Test.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)