Advertisement
MatveyL

дм.2

Apr 26th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. import copy
  2. a,b = map(int,input().split())
  3. A = [0 for i in range(b)]
  4. B =[]
  5.  
  6. for i in range(a):
  7. for j in range(b):
  8. if (j + i) % 2 == 1:
  9. A[j] = 1
  10. else:
  11. A[j] = 0
  12. p = copy.deepcopy(A)
  13. B.append(p)
  14. for i in range(a):
  15. for j in range(b):
  16. print(B[i][j], end = ' ')
  17. print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement