Question: The Assignment Using Turtle Graphics, draw the Union Jack, flag of the United Kingdom ( see the picture above ) . Note that you have

The Assignment
Using Turtle Graphics, draw the Union Jack, flag of the United Kingdom (see the picture above). Note that you have to actually draw it using Python turtle graphics; you can't just include an
image of the flag downloaded from the web. I chose that flag because it's interesting to draw, consisting of several simple shapes. In fact, ifyou do it right, it only really requires two
functions. But it also requires a bit of ingenuity to get it right.
You can find details about the flag design by Googling "flag of UK," but the main facts are these: The flag has a height to width ratio of 3 to 5. I would suggest drawing yours at 300x500
pixels, or larger. The details of the flag can be found on the following specification sheet.
One thing that's not completely clear from this sheet is that the diagonal axis is at an angle of 30.96 degrees from the horizontal axis. With that, you can figure out the rest of the dimensions,
assuming your trigonometry isn't too rusty. OK, sorry to scare you! I don't assume you know trigonometry. So here are some lengths you might find helpful. Consider where the white and
red diagonal stripe intersects the upper left corner of the flag. The intersection with the vertical border is approximately 3.5 and with the horizontal border is approximately 5.8(using the
units of the diagram above, which is 3050). If you know that the stripe has width 6(with components of 3 white, 2 red, 1 white), you should be able to figure out the rest. Ask if you have
trouble. BTW: the red diagonals aren't continuous; that is, they are two separate pieces, not a complete bar.
You must do this assignment in a modular fashion. That means defining functions to build a reusable drawing toolkit. For example, you might define a function to draw a rectangle with
parameters of the coordinates of the top left corner, width, height, and color. You can decide what functions you need, but you must have some.
And if you think about it, the UK flag is just a bunch of colored polygons (rectangles, triangles, and other odd shapes). I did my drawing by defining basically two functions (in addition to
main):
The first draws a closed polygon where the vertices are given as a list of pairs. Remember to return to the first pair on the list. The second function just calls the first, filling the polygon with
the color provided.
The Assignment Using Turtle Graphics, draw the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!