Answered step by step
Verified Expert Solution
Question
1 Approved Answer
*code must be in python* Draw a checkerboard that is centered in the middle of the drawing area using turtle. Each alternating tile of the
*code must be in python*
Draw a checkerboard that is centered in the middle of the drawing area using turtle. Each alternating tile of the board must be filled and use a color other than black. Program must include one function for drawing the outline of a square and a separate function for drawing a filled square. If you are clever, the function for drawing a filled square will call the function for drawing the outline of a square. If you are really clever you can use generalized polygon code from the exercises to support drawing squares. "This is an iterative problem involving two loops: one that draws all the cells in a row & one that draws each row. You may use several functions to encapsulate each of these concepts so that you can break the problem down into its constituent problems, solve each, and then work back to a complete solution. l.e. this whole problem is based on drawing at least 1 square. Start by developing the code to outline 1 square and test it. Once you've proved that you can draw the outline of 1 square, develop the code to fill 1 and test it. Remember we don't want to have the same code in more than one place, so try to implement your fill function using the function developed to outline a square. Once you've proven that you can draw both types of square, tackle drawing a single row of altemating squares & before moving on prove that the code is able to start with either a filled or unfilled square. Don't overthink this too much-it's a simple boolean problem and can be solved using simple boolean operations. Try to imagine an outlined square as 'fill off and a filled square as 'fill on' and the alternating action is a simple switch between 'fill on' and fill off. Once you've solved all the preceding problems, draw multiple rows to create the checkerboard just involves reusing the row drawing code. The hard part of this problem will most likely be resetting the location of the pen to draw a subsequent row, though this should be made easier if you use the 'set position' function to move the turtle to location** also use golorstring, begin_fill, end_fill Python Turtle GraphicsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started