Olli Graf
8 months ago
commit
2fb2e4ce6c
1 changed files with 32 additions and 0 deletions
@ -0,0 +1,32 @@ |
|||
#! /usr/bin/python |
|||
|
|||
field =[ |
|||
[1,0,0,0,0,0,0,0,0,0,0,0], |
|||
[0,1,0,0,0,0,0,0,0,0,0,0], |
|||
[0,0,1,0,0,0,0,0,0,0,0,0], |
|||
[0,0,0,1,0,0,0,0,0,0,0,0], |
|||
[0,0,0,0,1,0,0,0,0,0,0,0], |
|||
[0,0,0,0,0,1,0,0,0,0,0,0], |
|||
[0,0,0,0,0,0,1,0,0,0,0,0], |
|||
[0,0,0,0,0,0,0,1,0,0,0,0] |
|||
] |
|||
|
|||
def print_field(): |
|||
for line in range(0,len(field)): |
|||
curline = field[line] |
|||
|
|||
# print(f'line={line}') |
|||
for col in range(0,len(curline)): |
|||
# print(f'col={col}') |
|||
if curline[col] == 0: |
|||
print('o ', end='') |
|||
else: |
|||
print('x ', end='') |
|||
print('\n',end='') |
|||
|
|||
def main(): |
|||
print_field() |
|||
|
|||
|
|||
if __name__ == '__main__': |
|||
main() |
Loading…
Reference in new issue