def compare(self,K,L):
        """ Compare a different quantity and discount rate """

        myError(K)
        myError(L)
        
        self.K = K
        self.L = L
        
        try:
            g =[(lambda Ch,Co,D,K: "%2.2f" %((self.Ch*K/2)+(self.Co*self.D/K))),
                (lambda Ci,D,L : "%2.2f" %(self.Ci*self.D*L/100))]
            self.M = float(g[0](self.Ch,self.Co,self.D,K))
            self.N = float(g[1](self.Ci,self.D,L))
            self.O = "%2.0f" %(-(float(self.M) - float(self.I)) + (float(self.N)*100))
            self.P = float(self.O)- float(self.J)
            print "\n<The total cost of ordering batches of %s is: %s " % (self.K,int(self.M))

            if self.P >= 0:
                return "\n<The extra saving of ordering batches of %s is %s " % (K,int(self.P))
            else:
                return "\n<The extra loss of ordering batches of %s is %s " % (K,int(self.P))
                
        except MyZeroException, exception:
            print exception
            
        except MyNegativeException, exception:
            print exception
 Compare a different quantity and discount rate 
recipes/Python/576651_EOQ/recipe-576651.py