def Curve(self,**args):
        """
        Compute and display the Left Endpoint, the Right Endpoint
        and the midPoint approximaions of the area under a curve y = f(x)
        over an interval [a,b]
        """
        
        self.args = args
        
        count = 0   #Set count to 0
        total = 0   #Set total to 0
        
        print '\n\t\tLeft Endpoint Approximation'
        print '\t\t----------------------------'
        print '\nk\t\tX_k\t\ty','\n'
        
        # the curve y = f(x) is set to the 3rd degree of a form a + X**n
        # could be switched into higher degree or trigonometric functions
        for self.X_k in self.leftEndPoint:      
            self.left_curve = "%2.6f" % (self.args.get('a')*(float(self.X_k)**3)\
                                + self.args.get('b') *(float(self.X_k)**2)\
                                + self.args.get('c')*(float(self.X_k))+ self.args.get('d'))
            count +=1
            total += float(self.left_curve)
            
            print count,'\t\t',"%2.2f" % self.X_k,'\t\t',self.left_curve

        print '\t\t\t\t--------'
        print '\t\t\t\t',total
        print '\t\t\t\t--------'
        print 'left endpoint Approximation  =  %s' % (self.delta_X*total)
        print
        
        count_1 = 0 #Set count_1 to 0
        total_1 = 0 #Set total_1 to 0
        
        print '\n\t\tRight Endpoint Approximation'
        print '\t\t----------------------------'
        print '\nk\t\tX_k\t\ty','\n'
        
        for self.X_k in self.rightEndPoint:      
            self.right_curve = "%2.6f" % (self.args.get('a')*(float(self.X_k)**3)\
                                + self.args.get('b') *(float(self.X_k)**2)\
                             + self.args.get('c')*(float(self.X_k))+ self.args.get('d'))
            count_1 +=1
            total_1 += float(self.right_curve)
            
            print count_1,'\t\t',"%2.2f" % self.X_k,'\t\t',self.right_curve

        print '\t\t\t\t--------'
        print '\t\t\t\t',total_1
        print '\t\t\t\t--------'
        print 'right endpoint Approximation =  %s' % (self.delta_X*total_1)
        print
        
        count_2 = 0 #Set count_2 to 0
        total_2 = 0 #Set total_2 to 0
        
        print '\n\t\tMidpoint Approximation'
        print '\t\t----------------------'
        print '\nk\t\tX_k\t\ty','\n'
      
        for self.X_k in self.midPoint:      
            self.mid_curve = "%2.6f" % (self.args.get('a')*(float(self.X_k)**3)\
                            + self.args.get('b') *(float(self.X_k)**2)\
                         + self.args.get('c')*(float(self.X_k))+ self.args.get('d'))
            count_2 +=1
            total_2 += float(self.mid_curve)
            
            print count_2,'\t\t',"%2.2f" % self.X_k,'\t\t',self.mid_curve

        print '\t\t\t\t--------'
        print '\t\t\t\t',total_2
        print '\t\t\t\t--------'
        print '      midPoint Approximation =  %s' % (self.delta_X*total_2)

        Compute and display the Left Endpoint, the Right Endpoint
        and the midPoint approximaions of the area under a curve y = f(x)
        over an interval [a,b]
        
recipes/Python/576897_RectangleMethod/recipe-576897.py