In a program, write a function named drawPattern that uses the turtle graphics library to draw the

Question:

In a program, write a function named drawPattern that uses the turtle graphics library to draw the rectangular pattern shown in Figure 5-31. The drawPattern function should accept two arguments: one that specifies the pattern’s width, and another that specifies the pattern’s height. (The example shown in Figure 5-31 shows how the pattern would appear when the width and the height are the same.) When the program runs, the program should ask the user for the width and height of the pattern, then pass these values as arguments to the drawPattern function.Figure 5-31 Rectangular pattern

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: