code: def pts_on_bezier_curve(P=[(0.0, 0.0)], n_seg=0):
      '''Return list N+1 points representing N line segments on bezier curve
    defined by control points P.
      '''
      assert isinstance(P, list)
      assert len(P) > 0
      for p in P:
          assert isinstance(p, tuple)
          for i in p:
              assert len(p) > 1
              assert isinstance(i, float)
      assert isinstance(n_seg, int)
      assert n_seg >= 0
      
      return [pt_on_bezier_curve(P, float(i)/n_seg) for i in range(n_seg)] + [P[-1]f pts_on_bezier_curve(P=[(0.0, 0.0)], n_seg=0):
      '''Return list N+1 points representing N line segments on bezier curve
    defined by control points P.
      '''
      assert isinstance(P, list)
      assert len(P) > 0
      for p in P:
          assert isinstance(p, tuple)
          for i in p:
              assert len(p) > 1
              assert isinstance(i, float)
      assert isinstance(n_seg, int)
      assert n_seg >= 0
      
      return [pt_on_bezier_curve(P, float(i)/n_seg) for i in range(n_seg)] + [P[-1]]
docs: Return list N+1 points representing N line segments on bezier curve
    defined by control points P.