Help with drawing checker board

For my assignment, we have to create a chess board on a canvas so that it doesn’t take up the full canvas. However, all I can create is one that does not look completed. Each square must be 3030 and it is an 88 board. I can only attach one image per post, so I have the results attached in this post and the the code itself is in the comments.

If the parts have to be 30 in size, then you should replace the size in rect() with 30 and 30. That should reduce the problems. Also, please send Code as text, not image, because this is difficult to read and doesn’t cover the whole code…
Just copy past the code here, inside the ‘’’ created by pressing the </> sign.


And mainly, we can’t just copy paste it to try it out!

@gpevehou Also, make sure your code doesn’t have any dependent libraries, which i think your code is pretty straight forward.