SlideShare a Scribd company logo
1 of 1
Download to read offline
Program 1: Frame a plcture (25 marks) a) Write a program lo draw a picture in Phthon asing the
ImagelDraw class and then frame the picture accotding to the Gollowing criteria - Your program
"L.10Q1 initials. py" must start with a commented acadcmic integrity pledge, ID Box, and
program purpose. EACH function in your progsam mast stite its parpose in coemments. Ensase
you groap your code into logical blocks and use comments to explain each block. Coding style is
important! - When the main fusction frane petctoredenle_nate? is called, it shoeld drou pictero ()
(b) revine the drawn picture so it is 80es of the frame's width and height (c) paste the resized
pecture into the frame ceatorind it vortically and horitomtally (d) show only the final framed
picture (a) open the broken frame picture indicaled by fil= nase (b) crop the groen, yeilow, blac,
and red uctions from the brolse frame (c) resize the yellow, blec, and red sections to matelh the
groen section (d) totate the yetlow and blue stetions to match the expocted orientation: (e) paste
the foor section s into their eorrect locations to fix the frame (i) reture the fived frame picture To
work properly on both beoken frame files provided ( "lsoken _600 , prig' and 'bcoken 760 . prig')
all coordiniles used in this function should be calculated by the program using the frame's width
and height. Do not lhardoode coondinatest - The helper function dras pioture (1) mill crcale and
retum in new pecture with an equivalent width and height of at least (100, 100). For this
function. coordinates can be hardooded. The picture must have a minimasr of: 2 circles (or ovals)
2 rectangles (or sqaarei) 2 lines 2 triangles A tifle that describes your pictare Hour or more
visibly different coloors A sample picture drawn finting these eriteria has becu peovided, but the
mobject matier of your picture is of your own choosing. Please be creative and have fan with it?
* The pictures below demonstrate how 'brokes 600.0poz ' in ficced and then filled with a pioture
drawn using shapes. The progrant woeld work similarly when lested on "broken_760.phg'.
- The pictures below demonstrate how 'broken 600.png ' is foced and then filled with a picture
drawn using shapes. The program would work similarly when lested
1

More Related Content

Similar to Program 1 Frame a plcture (25 marks) a) Write a program lo draw a pi.pdf

AIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdfAIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdf
ssuserb4d806
 
Matlab intro
Matlab introMatlab intro
Matlab intro
fvijayami
 
project_final_seminar
project_final_seminarproject_final_seminar
project_final_seminar
MUKUL BICHKAR
 
Image contro, and format functions in vb
Image contro, and format functions in vbImage contro, and format functions in vb
Image contro, and format functions in vb
Amandeep Kaur
 

Similar to Program 1 Frame a plcture (25 marks) a) Write a program lo draw a pi.pdf (20)

Writeup advanced lane_lines_project
Writeup advanced lane_lines_projectWriteup advanced lane_lines_project
Writeup advanced lane_lines_project
 
AIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdfAIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdf
 
Matlab intro
Matlab introMatlab intro
Matlab intro
 
Programming in matlab lesson5
Programming in matlab lesson5Programming in matlab lesson5
Programming in matlab lesson5
 
An Enhancement of Braille Character Perception Using Deep Learning and Artifi...
An Enhancement of Braille Character Perception Using Deep Learning and Artifi...An Enhancement of Braille Character Perception Using Deep Learning and Artifi...
An Enhancement of Braille Character Perception Using Deep Learning and Artifi...
 
Image Classification using Deep Learning
Image Classification using Deep LearningImage Classification using Deep Learning
Image Classification using Deep Learning
 
Project 5
Project 5Project 5
Project 5
 
DIWE - Using Extensions and Image Manipulation
DIWE - Using Extensions and Image ManipulationDIWE - Using Extensions and Image Manipulation
DIWE - Using Extensions and Image Manipulation
 
Lossless Huffman coding image compression implementation in spatial domain by...
Lossless Huffman coding image compression implementation in spatial domain by...Lossless Huffman coding image compression implementation in spatial domain by...
Lossless Huffman coding image compression implementation in spatial domain by...
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
M14 overview
M14 overviewM14 overview
M14 overview
 
CE344L-200365-Lab5.pdf
CE344L-200365-Lab5.pdfCE344L-200365-Lab5.pdf
CE344L-200365-Lab5.pdf
 
User guide of numerical simulation gridding v2.2.0
User guide of numerical simulation gridding v2.2.0User guide of numerical simulation gridding v2.2.0
User guide of numerical simulation gridding v2.2.0
 
Build Your Own 3D Scanner: 3D Scanning with Structured Lighting
Build Your Own 3D Scanner: 3D Scanning with Structured LightingBuild Your Own 3D Scanner: 3D Scanning with Structured Lighting
Build Your Own 3D Scanner: 3D Scanning with Structured Lighting
 
Image processing using matlab
Image processing using matlab Image processing using matlab
Image processing using matlab
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
project_final_seminar
project_final_seminarproject_final_seminar
project_final_seminar
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging System
 
Image contro, and format functions in vb
Image contro, and format functions in vbImage contro, and format functions in vb
Image contro, and format functions in vb
 
CG_Unit1_SShah.pptx
CG_Unit1_SShah.pptxCG_Unit1_SShah.pptx
CG_Unit1_SShah.pptx
 

More from aludin007

Programming II hiding, and .pdf
 Programming II hiding, and .pdf Programming II hiding, and .pdf
Programming II hiding, and .pdf
aludin007
 

More from aludin007 (20)

Problem 4 Suppose that the government sets an emission fee of $8000.pdf
 Problem 4 Suppose that the government sets an emission fee of $8000.pdf Problem 4 Suppose that the government sets an emission fee of $8000.pdf
Problem 4 Suppose that the government sets an emission fee of $8000.pdf
 
Problem 5 Prove or disprove the statement n!2n for all integers n1..pdf
 Problem 5 Prove or disprove the statement n!2n for all integers n1..pdf Problem 5 Prove or disprove the statement n!2n for all integers n1..pdf
Problem 5 Prove or disprove the statement n!2n for all integers n1..pdf
 
Problem 5 A $1,000 bond with a 4 years life is paying a semiannual co.pdf
 Problem 5 A $1,000 bond with a 4 years life is paying a semiannual co.pdf Problem 5 A $1,000 bond with a 4 years life is paying a semiannual co.pdf
Problem 5 A $1,000 bond with a 4 years life is paying a semiannual co.pdf
 
Problem 5 (16 points) Jack and Jill Smith have just retired and want.pdf
 Problem 5 (16 points) Jack and Jill Smith have just retired and want.pdf Problem 5 (16 points) Jack and Jill Smith have just retired and want.pdf
Problem 5 (16 points) Jack and Jill Smith have just retired and want.pdf
 
Problem 4. Radix Sort Q4. Select all properties of the radix sort. ru.pdf
 Problem 4. Radix Sort Q4. Select all properties of the radix sort. ru.pdf Problem 4. Radix Sort Q4. Select all properties of the radix sort. ru.pdf
Problem 4. Radix Sort Q4. Select all properties of the radix sort. ru.pdf
 
Problem 4. Bubble Sort Q2. Select all properties of the bubble sort. .pdf
 Problem 4. Bubble Sort Q2. Select all properties of the bubble sort. .pdf Problem 4. Bubble Sort Q2. Select all properties of the bubble sort. .pdf
Problem 4. Bubble Sort Q2. Select all properties of the bubble sort. .pdf
 
Problem 4. (20 marks) Let a message M of 128 bits be encrypted with 1.pdf
 Problem 4. (20 marks) Let a message M of 128 bits be encrypted with 1.pdf Problem 4. (20 marks) Let a message M of 128 bits be encrypted with 1.pdf
Problem 4. (20 marks) Let a message M of 128 bits be encrypted with 1.pdf
 
Problem 3. (Central Limit Theorem Step 2) Let X be a mean 0 variance.pdf
 Problem 3. (Central Limit Theorem Step 2) Let X be a mean 0 variance.pdf Problem 3. (Central Limit Theorem Step 2) Let X be a mean 0 variance.pdf
Problem 3. (Central Limit Theorem Step 2) Let X be a mean 0 variance.pdf
 
Problem 3 a) A portfolio consisting of Stocks 1 and 2 has an expected.pdf
 Problem 3 a) A portfolio consisting of Stocks 1 and 2 has an expected.pdf Problem 3 a) A portfolio consisting of Stocks 1 and 2 has an expected.pdf
Problem 3 a) A portfolio consisting of Stocks 1 and 2 has an expected.pdf
 
Problem 2. The random variables X and Y have joint probability densil.pdf
 Problem 2. The random variables X and Y have joint probability densil.pdf Problem 2. The random variables X and Y have joint probability densil.pdf
Problem 2. The random variables X and Y have joint probability densil.pdf
 
Problem 3. Using the Probability mass function found below, construct.pdf
 Problem 3. Using the Probability mass function found below, construct.pdf Problem 3. Using the Probability mass function found below, construct.pdf
Problem 3. Using the Probability mass function found below, construct.pdf
 
Problem 2. Prove that the language L2={aib2ii0} is not regular langua.pdf
 Problem 2. Prove that the language L2={aib2ii0} is not regular langua.pdf Problem 2. Prove that the language L2={aib2ii0} is not regular langua.pdf
Problem 2. Prove that the language L2={aib2ii0} is not regular langua.pdf
 
Problem 4 Let X be a uniform (0,1) random variable, and let Y=eX. a. .pdf
 Problem 4 Let X be a uniform (0,1) random variable, and let Y=eX. a. .pdf Problem 4 Let X be a uniform (0,1) random variable, and let Y=eX. a. .pdf
Problem 4 Let X be a uniform (0,1) random variable, and let Y=eX. a. .pdf
 
Problem 3. Graph Q2. Match the graphs with their descriptions. DAG [C.pdf
 Problem 3. Graph Q2. Match the graphs with their descriptions. DAG [C.pdf Problem 3. Graph Q2. Match the graphs with their descriptions. DAG [C.pdf
Problem 3. Graph Q2. Match the graphs with their descriptions. DAG [C.pdf
 
Problem 3. Tree Q1. Choose yes or no to the following statements abou.pdf
 Problem 3. Tree Q1. Choose yes or no to the following statements abou.pdf Problem 3. Tree Q1. Choose yes or no to the following statements abou.pdf
Problem 3. Tree Q1. Choose yes or no to the following statements abou.pdf
 
Problem 2. Solve the following linear problem using the Dual Simplex .pdf
 Problem 2. Solve the following linear problem using the Dual Simplex .pdf Problem 2. Solve the following linear problem using the Dual Simplex .pdf
Problem 2. Solve the following linear problem using the Dual Simplex .pdf
 
Problem 4 (10 pts) Write a complete C program and create a user defi.pdf
 Problem 4 (10 pts) Write a complete C program and create a user defi.pdf Problem 4 (10 pts) Write a complete C program and create a user defi.pdf
Problem 4 (10 pts) Write a complete C program and create a user defi.pdf
 
Problem 4 (p. 219#12 ). Let W1 and W2 be independent geometric random.pdf
 Problem 4 (p. 219#12 ). Let W1 and W2 be independent geometric random.pdf Problem 4 (p. 219#12 ). Let W1 and W2 be independent geometric random.pdf
Problem 4 (p. 219#12 ). Let W1 and W2 be independent geometric random.pdf
 
Programming II hiding, and .pdf
 Programming II hiding, and .pdf Programming II hiding, and .pdf
Programming II hiding, and .pdf
 
Procedure #2 The experiment has been set up for you. You will observ.pdf
 Procedure #2 The experiment has been set up for you. You will observ.pdf Procedure #2 The experiment has been set up for you. You will observ.pdf
Procedure #2 The experiment has been set up for you. You will observ.pdf
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

Program 1 Frame a plcture (25 marks) a) Write a program lo draw a pi.pdf

  • 1. Program 1: Frame a plcture (25 marks) a) Write a program lo draw a picture in Phthon asing the ImagelDraw class and then frame the picture accotding to the Gollowing criteria - Your program "L.10Q1 initials. py" must start with a commented acadcmic integrity pledge, ID Box, and program purpose. EACH function in your progsam mast stite its parpose in coemments. Ensase you groap your code into logical blocks and use comments to explain each block. Coding style is important! - When the main fusction frane petctoredenle_nate? is called, it shoeld drou pictero () (b) revine the drawn picture so it is 80es of the frame's width and height (c) paste the resized pecture into the frame ceatorind it vortically and horitomtally (d) show only the final framed picture (a) open the broken frame picture indicaled by fil= nase (b) crop the groen, yeilow, blac, and red uctions from the brolse frame (c) resize the yellow, blec, and red sections to matelh the groen section (d) totate the yetlow and blue stetions to match the expocted orientation: (e) paste the foor section s into their eorrect locations to fix the frame (i) reture the fived frame picture To work properly on both beoken frame files provided ( "lsoken _600 , prig' and 'bcoken 760 . prig') all coordiniles used in this function should be calculated by the program using the frame's width and height. Do not lhardoode coondinatest - The helper function dras pioture (1) mill crcale and retum in new pecture with an equivalent width and height of at least (100, 100). For this function. coordinates can be hardooded. The picture must have a minimasr of: 2 circles (or ovals) 2 rectangles (or sqaarei) 2 lines 2 triangles A tifle that describes your pictare Hour or more visibly different coloors A sample picture drawn finting these eriteria has becu peovided, but the mobject matier of your picture is of your own choosing. Please be creative and have fan with it? * The pictures below demonstrate how 'brokes 600.0poz ' in ficced and then filled with a pioture drawn using shapes. The progrant woeld work similarly when lested on "broken_760.phg'. - The pictures below demonstrate how 'broken 600.png ' is foced and then filled with a picture drawn using shapes. The program would work similarly when lested 1