Assume that in a program, the following statement creates a Canvas widget and assigns it to the

Question:

Assume that in a program, the following statement creates a Canvas widget and assigns it to the self.canvas variable: 

self.canvas = tkinter.Canvas(self.main_window, width=200, height=200)

Write statements that do the following:

a) Draws a blue line from the Canvas widget’s upper-left corner to its lower-right corner. The line should be 3 pixels wide.

b) Draws a rectangle with a red outline and a black interior. The rectangle’s corners should appear in the following locations on the Canvas:

• Upper-left: (50, 50)

• Upper-right: (100, 50)

• Lower-left: (50, 100)

• Lower-right: (100, 100)

c) Draws a green circle. The circle’s center-point should be at (100, 100), and its radius should be 50.

d) Draws a blue-filled arc that is defined by a bounding rectangle with its upper-left corner at (20, 20), and its lower-right corner at (180, 180). The arc should start at 0 degrees, and extend for 90 degrees.

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

Step by Step Answer:

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