+ 2

how I can do a chess board in python?

I want to make function : def create_chess_board(num_of_squares,size_of_square): , num_of squares represent how may squares in every row and in every column ,while size_of_square represent how tall the square is on pixels . (squares in chess are white black) ,by example; if create_chess_board(8,10) , i will get a chess with 64 squares(8×8) , the size for every square is (10,10) , and the size for all this is 80*80 , and half of them white, and half of them black(as chess).

10th Oct 2018, 7:18 PM
sama baluom
sama baluom - avatar
2 Answers
+ 6
I made this a while ago, maybe you can take some inspiration ;) https://code.sololearn.com/cL8cKWNLyf3m/?ref=app
10th Oct 2018, 7:40 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 1
10th Oct 2018, 7:52 PM
sama baluom
sama baluom - avatar