Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

' broken_600.png' a) Write a program to draw a picture in Python using the ImageDraw class and then frame the picture according to the following


student submitted image, transcription available belowstudent submitted image, transcription available belowstudent submitted image, transcription available below'
broken_600.png'
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 INNNNNNNNN

 
 
 

a) Write a program to draw a picture in Python using the ImageDraw class and then frame the picture according to the following criteria: Y our program "LIOQlinitials.py" must start with a commented academic integrity pledge, ID Box, and program purpose. EACH function in your program must state its purpose in comments. Ensure you group your code into logical blocks and use comments to explain each block. Coding style is important! When the main function frame _picture (file_name) is called, it should: a) call two helper functions: fix_frame (file_name) draw_picture() (b) resize the drawn picture so it is 80% of the frame's width and height (c) paste the resized picture into the frame centering it vertically and horizontally (d) show only the final framed picture The helper function fix frame (file_name) will: (screenshots on next page) open the broken frame picture indicated by file_name (a) crop the green, yellow, blue, and red sections from the broken frame resize the yellow, blue, and red sections to match the green section rotate the yellow and blue sections to match the expected orientations paste the four sections into their correct locations to fix the frame return the fixed frame picture (b) (c) (d) (e) (f) To work properly on both broken frame files provided ('broken_600.png' and 'broken_760.png'), all coordinates used in this function should be calculated by the program using the frame's width and height. Do not hardcode coordinates! The helper function draw_picture i) will create and return a new picture with an equivalent width and height of at least (100, 100). For this function, coordinates can be hardcoded. The picture must have a minimum of: o 2 circles (or ovals) o 2 rectangles (or squares) o 2 lines o 2 triangles o A title that describes your picture o Four or more visibly different colours A sample picture drawn fitting these criteria has been provided, but the subject matter of your picture is of your own choosing. Please be creative and have fun with

Step by Step Solution

3.34 Rating (154 Votes )

There are 3 Steps involved in it

Step: 1

Creating the Python program as described can be a complex task Below is a basic outline of the program structure and Ill provide some sample code snip... 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

Corporate Finance A Focused Approach

Authors: Michael C. Ehrhardt, Eugene F. Brigham

6th edition

1305637100, 978-1305637108

More Books

Students explore these related Programming questions