Sign in
or
Register
Courses
Textbook
Compiler
Contests
Topics
Courses
Python. Data storage and processing
Numpy. Working with arrays and matrices
Module:
Numpy. Working with arrays and matrices
Problem
12
/12
Chess board
Problem
The color of a chessboard cell is conditionally encoded by the numbers 1 and 0. Black color - 1, white color - 0. The upper left corner of the board is black.
For the given number
n,
display the code table of colors for the chessboard size
n
by
n.
Examples
#
Input
Output
1
4
[[1 0 1 0]
[0 1 0 1]
[1 0 1 0]
[0 1 0 1]]
2
3
[[1 0 1]
[0 1 0]
[1 0 1]]
1000
ms
256 Mb
Rules for program design and list of errors in automatic problem checking
Teacher commentary