Question: The process we used to draw borders could actually be used to draw lines as well. For example, if you have a square picture, every

The process we used to draw borders could actually be used to draw lines as well. For example, if you have a square picture, every pixel whose x value equals its y value lies on the diagonal from upper-left to lower-right corners. Write a function that inputs a square picture (you can assume square) and an input color, and draws a diagonal line from upper-left to lower-right using the input color for the line color.

Step by Step Solution

3.33 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

def drawDiagonalpictu... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction to Computing and Programming in Pytho Questions!