logo CodeStepByStep logo

mickey_box2

Language/Type: Python DrawingPanel graphics parameters
Related Links:

Modify your code from the previous exercise to write a complete program that draws the figure by a function named mickey_box. The function should accept three parameters: the DrawingPanel on which to draw, and a pair of x/y coordinates specifying the location of the top-left corner of the figure. Use the following heading for your function:

def draw_figure(panel, x, y):

Set your DrawingPanel's size to 450 by 150 pixels, and use your function to place two figures on it, as shown below. One figure should be at position (50, 25) and the other should be at position (250, 45).

expected output
Complete program: Write an entire program that you could put into a file and run outside of CodeStepByStep.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.