Exam 1: Wednesday, Feb 20
There is a study guide on Sakai, in the Resources folder. Solutions are
there too. There is also a one-page Python summary that will be included
with the exam.
The study guide
for and while loops; ranges
Using strings and combining strings: s+t, s*3, but little indexing; no slicing or substrings
Graphics will not be on the exam.
"tricky" dictionary use, such as .format(**dict) (used in MadLibs) will not be used.
You should be generally familiar with for loops used with lists:
However, list indexing (theList[i]) will not be on the exam.
parameterized smile: center top edge is at (0,0).
def smile(width, height, width2, height2, width3):
rightpoints = [Point(width,0), Point(width2, -height2), Point(width3, height)]
leftpoints = 
for p in rightpoints:
lp = Point(-p.getX(), p.getY())
leftpoints = [lp] + leftpoints
return Polygon(rightpoints + leftpoints)