code: def derivative(self, t=None, n=1):
          
          assert self.end != self.start
          if n == 1:
              return self.end - self.start
          elif n > 1:
              return 0
          else:
              raise ValueError("n should be a positive integer.")
docs: returns the nth derivative of the segment at t.