Draw diagonal lines on a picture from top right to bottom left using addLine.

What will be an ideal response?


```
def lineDiagonal2 ():
img = makePicture(pickAFile())
midHeight = getHeight(img)/2
midWidth = getWidth(img)/2

addLine(img, getWidth(img), 0, midWidth, midHeight)
addLine(img, midWidth, midHeight, 0, getHeight(img))

show(img)
return img
```

Computer Science & Information Technology

You might also like to view...

Evaluate the following conditional expressions in a step-by-step manner as shown in the examples when x = 1 and y = 2.

Note: In the solutions below, indicate the current logical expression being evaluated according to the rules of precedence. ``` x-2 ORy=2 ORy=3 ``` Evaluates as True

Computer Science & Information Technology

The Remove Freeze command is used to turn off the Freeze Pane

Indicate whether the statement is true or false

Computer Science & Information Technology

To enable visitors to select more than one item from a list, click the Yes option in the ____ section of the Drop-Down Box Properties dialog box.

A. Select selections B. Allow multiple selections C. Create multiple selections D. Set selections

Computer Science & Information Technology

A user attempts to run an old program on their Windows 7 computer. The program briefly opens then closes immediately. Which of the following can the technician do to allow the program to run correctly on the user's computer?

A. Run the program inside a virtual machine B. Run the program in Windows Compatibility mode C. Run the program after changing permissions to the executable D. Run the program from the command prompt

Computer Science & Information Technology