


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Exam; Professor: Sykes; Class: Programming & Problem Solving; Subject: Computer Science; University: Wofford College; Term: Spring 2008;
Typology: Exams
1 / 4
This page cannot be seen from the preview
Don't miss anything!



A B A op B False False False False True True True False True True True True
A op B False True False True True False True False
A B A op B False False True False True True True False True True True False
A B A op B False False False False True False True False False True True True
def findIndexOf(aList, value): """Return the lowest index k such that aList[k] equals value if such a k exists. Return len(aList) otherwise."""
k = 0 while k < len(aList) and aList[k] != value: k += 1
return k
filename = raw_input("Enter a file name: ") datafile = open(filename)
lineNumber = 1 # accumulator for line in datafile: print "%4d\t%s" % (lineNumber, line), lineNumber += 1
datafile.close()
win = GraphWin("Sample Window",400, 400)
pt = Point(10, 100)
pt.setFill(color="blue")
pt.draw(win)
win.getMouse()
win.close()
(a) a,^ b,^ c^ =^ 3,^ 3,^3 if a + b <= c or a + c <= b or b + c < a: print "X" else: if a == b and a == c: print "E" if a == b or a == c or b == c: print "I" else: print "S"