Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how do I update my main method so that make a 5x10 square design? ( how do i continue my code to make it? output

how do I update my main method so that make a 5x10 square design? ( how do i continue my code to make it? output is at the bottom)
image text in transcribed
image text in transcribed
import turtle def main(): bob = turtle. Turtle() "draws the bottom row squares first.' drawSquare (bob, "blue", 20) drawSquare (bob, "medium violet red", 20) drawSquare ( bob, "green", 20) bob.right(90) bob.right (90) "'moves the turtle to the up one row.'' newrow (bob, 20,1) bob.right (90) "draws the bottom+1 row that means the first row squares.' drawSquare (bob, "yellow", 20) drawSquare(bob, "light sky blue", 20) drawSquare (bob, "chocolate", 20) "''draws the square and fills the square with the specified color.' def drawSquare(t, color, size): t.fillcolor (color) t.begin_fill() for i in range(4): t. forward(size) t.right (90) t.forward(size) t.end_fill() ''moves the turtule to the up row. def newRow(t, size, number): t.forward(size*3) t.right (90) t.forward(size*number) "''calls the main method to produce the desired output.'' main() 11

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions