Final Exam - Wednesday December 9 1:00-3:00 PM

The final exam is Wednesday December 9, 1:00 - 3:00 PM in our class room. The exam will be written, no notes, no calculator, just pencil/pen/eraser and paper. The format will be very similar to the previous exams, although there will be more problems.

Content

The final is cumulative so anything from the entire course can be on the exam. Having said that, roughly 60%-70% of the questions will be from material from Day 28 through the end of the course (this is material that did not appear on Exam 1 or Exam 2). Look back at the pages for the lectures plus the review pages for the first two exams. The highlights for Day 28 on are

Sample Problems

Answers

def sum(n=100):
    result = 0
    for i in range(n+1):
        result +=1
    print(result)
sum()
sum(40)
sum(n=20)

Two classes:

class Shape:
    def area(self):
        pass
class Circle:
    def __init__(self, radius):
        self.radius = radius
    def area(self):
        return self.pi * self.radius ** 2
class Square:
    def __init__(self, side):
        self.side = side
    def area(self):
        return self.side ** 2