fork download
  1. #U3RlcHVrb3Zh
  2. import numpy as np
  3.  
  4. def create_checkers_board():
  5. board = np.full((8, 8), '🤢', dtype=object)
  6.  
  7. for i in range(8):
  8. for j in range(8):
  9. if (i + j) % 2 == 1:
  10. if i < 3:
  11. board[i, j] = 'âš«'
  12. elif i > 4:
  13. board[i, j] = '⚪'
  14. return board
  15.  
  16. board = create_checkers_board()
  17. for row in board:
  18. print(' '.join(row))
Success #stdin #stdout 0.82s 41424KB
stdin
Standard input is empty
stdout
🤢 ⚫ 🤢 ⚫ 🤢 ⚫ 🤢 ⚫
⚫ 🤢 ⚫ 🤢 ⚫ 🤢 ⚫ 🤢
🤢 ⚫ 🤢 ⚫ 🤢 ⚫ 🤢 ⚫
🤢 🤢 🤢 🤢 🤢 🤢 🤢 🤢
🤢 🤢 🤢 🤢 🤢 🤢 🤢 🤢
⚪ 🤢 ⚪ 🤢 ⚪ 🤢 ⚪ 🤢
🤢 ⚪ 🤢 ⚪ 🤢 ⚪ 🤢 ⚪
⚪ 🤢 ⚪ 🤢 ⚪ 🤢 ⚪ 🤢