' broken_600.png' a) Write a program to draw a picture in Python using the ImageDraw class and...
Fantastic news! We've Found the answer you've been seeking!
Question:
'
broken_600.png'
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
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... View the full answer
Related Book For
Corporate Finance A Focused Approach
ISBN: 978-1305637108
6th edition
Authors: Michael C. Ehrhardt, Eugene F. Brigham
Posted Date:
Students also viewed these programming questions
-
What are the main questions a Kaizen team should be able to answer?
-
Calculate the amount of financing needed for Molycorp in 2012. Hint: financing amount is use of cash (capital expenditures, repayment of debt, investment in net working capital, interest expenses)...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Data obtained from asking the wrong questions at the wrong time or in the wrong place can lead to misleading summary statistics. Explain why the following collection procedures are likely to produce...
-
What role does information technology play in each of these businesses? How is it helping them refine their business strategies?
-
Why is an own occupation definition for disability so valuable?
-
Blare Company had a return on sales of 6.5 percent and an asset turnover of 2.40. What is Blare's return on assets?
-
Wexpro, Inc., produces several products from processing 1 ton of clypton, a rare and processing costs total $60,000 per ton, one-fourth of which is allocated to product thousand units of product X15...
-
/ilm/takeAssignment/takeAssignmentMain.do?invoker &takeAssignmentSessionLocator &inprogress... A eBook Show Me How Entries for equity investments: 20%-50% ownership At a total cost of $1,856,000,...
-
Which series has the highest beta. BraveNewCoin Liquid Index for Bitcoin 1D BNC Trading Brave Ne Yellow Green Blue Orange
-
What can we infer about construction guidelines and damage from landslides in Los Angeles, California? image There is a direct correlation between the number of sites constructed and stricter...
-
12 Let A = 03-1 02 3 , if det (-(A2))=-4, find the value(s) of x. -5
-
Schmelli Services, Inc. has offices in 24 cities in several eastern and southeastern states. Schmelli owes your client, Atlanta Industrial Bank (AIB), approximately $4,500,000 under line of credit...
-
Through the steps of this problem, you will be determining the semimajor axis ( a ) of this orbit. Use 3 decimal places in your calculations and answers, as applicable. Points are noted next to each...
-
riding his bicycle uphill in Ty is Fdmonton's river valley, the gains of elevation over the of trail in 8.0 minutos. Ty have a combined mass of gokg How much work did Ty do to make the climb7 65...
-
Sketch both of these graphs by using the Following data: Graph #1 f(2)= undefined f(-3) = 3 lim f(x) = 1 x-27 lim f(x) = 5 Graph #2 lim f(x) = 1 x -00 lim f(x) = -4 x+00 lim_ f(x) = 3 x-4 lim f(x) =...
-
7. Using C++ code, write a program to read an integer B from the keyboard and compute (and print to the screen) the (total) area of grassland needed by B bison, where each bison needs 81 m of...
-
The maximum pressure that can be developed for a certain fluid power cylinder is 15.0 MPa. Compute the required diameter for the piston if the cylinder must exert a force of 30 kN.
-
Maggie's Muffins Bakery generated $5,000,000 in sales during 2016, and its year-end total assets were $2,500,000. Also, at year-end 2016, current liabilities were $1,000,000, consisting of $300,000...
-
a. The 2016 sales of Cumberland Industries were $455,000,000; operating costs (excluding depreciation) were equal to 85% of sales; net fixed assets were $67,000,000; depreciation amounted to 10% of...
-
Consider a $25,000 loan to be repaid in equal installments at the end of each of the next 5 years. The interest rate is 10%. a. Set up an amortization schedule for the loan. b. How large must each...
-
The President of Musicland has asked for help to evaluate the company's performance during the current year. In particular, we are requested to calculate Musicland's gross profit and its return on...
-
The Counter Company just completed the year-end physical count of its inventory. The total value of inventory was determined to be \($300,000\). The following additional information came to light...
-
Williams Distributing Company is a merchandising company. Williams uses the perpetual inventory system. eames, Record each of the following transactions related to the companys purchasing and selling...
Study smarter with the SolutionInn App