diff --git a/DIRECTORY.md b/DIRECTORY.md index 00f4bb4ef2b2..dfecc9cfe584 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -443,6 +443,7 @@ * [Present Value](financial/present_value.py) * [Price Plus Tax](financial/price_plus_tax.py) * [Simple Moving Average](financial/simple_moving_average.py) + * [Straight Line Depreciation](financial/straight_line_depreciation.py) * [Time And Half Pay](financial/time_and_half_pay.py) ## Fractals diff --git a/maths/radix2_fft.py b/maths/radix2_fft.py index ccd5cdcc0160..fc71f98ec0be 100644 --- a/maths/radix2_fft.py +++ b/maths/radix2_fft.py @@ -159,13 +159,13 @@ def __multiply(self): # Overwrite __str__ for print(); Shows A, B and A*B def __str__(self): a = "A = " + " + ".join( - f"{coef}*x^{i}" for coef, i in enumerate(self.polyA[: self.len_A]) + f"{coef}*x^{i}" for i, coef in enumerate(self.polyA[: self.len_A]) ) b = "B = " + " + ".join( - f"{coef}*x^{i}" for coef, i in enumerate(self.polyB[: self.len_B]) + f"{coef}*x^{i}" for i, coef in enumerate(self.polyB[: self.len_B]) ) c = "A*B = " + " + ".join( - f"{coef}*x^{i}" for coef, i in enumerate(self.product) + f"{coef}*x^{i}" for i, coef in enumerate(self.product) ) return f"{a}\n{b}\n{c}"