Question: 8 . 1 8 . 5 : Create and save a 2 0 0 2 0 0 pixel image containing two triangles. Complete the following
: Create and save a pixel image containing two triangles.
Complete the following program that creates and saves a pixel image containing two triangles. The triangle on the top
right half of the image contains pure green pixels. The triangle on the bottom left half of the image contains pure red pixels. A
single diagonal line of pixels that separates the two triangles contains pure white pixels. Note: pixels that have not been assigned
a color are are white by default.
In the output produced, R represents a red pixel, G represents a green pixel, W represents a white pixel, and A represents a pixel of
any other color.
from ezgraphics import GraphicsImage
image GraphicsImage
# Your code goes here
image.savetrianglesgif"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
