This preview shows page 1. Sign up to view the full content.
Unformatted text preview: on graphics based program that requires the user to click on two points in its window.
The program then draws the axis aligned rectangle for which those two points are in opposing corners
along with both diagonals of this rectangle. 4 8. Trace the following Python code, i.e. indicate the state of the variables as they change and what output
is printed to the screen:
for i in range(2,7)
f, s = s, f + s
print("f =", f, " s=", s) (b) n = 16
for c in range(5):
print("n =", n, " k = ", k) 9. Draw the output that would be displayed in the program’s window if the following Python graphics
based program were executed:
from graphics import *
win = GraphWin("Picture", 400, 400)
View Full Document
This document was uploaded on 03/24/2014 for the course CMP 230 at Lehman College.
- Fall '13