Please help me with, creating an checker board!!

this is all i got right now

from cs1graphics import *

n = 8
paper = Canvas(400, 400)
for y in range(n) :
    for x in range(n) :
        square = Square(100)
        square.moveTo(x*50, y*50)
        paper.add(square)

Recommended Answers

All 2 Replies

I doubt anyone is familiar with cslgraphics, and would not have it installed. You will have to provide more info about the cslgraphics package. Also "Please help me with, creating an checker board" is way too vague to respond to.

Please help me with, creating an checker board!!

this is all i got right now

from cs1graphics import *

n = 8
paper = Canvas(400, 400)
for y in range(n) :
    for x in range(n) :
        square = Square(100)
        square.moveTo(x*50, y*50)
        paper.add(square)

I tested your code and it works, so what is the question ? The next step is probably to use the setFillColor() method.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.