Forgot to prefx 'self.' to all teh list objects in the Factor object.

This commit is contained in:
2020-04-13 01:19:40 -05:00
parent 39c94aafa9
commit 7605bcdf68
+8 -8
View File
@@ -16,20 +16,20 @@ class Factor:
clear_factors_lists(self)
for item in self.base_list:
simple_one.append(factor / item)
simple_two.append(factor * item)
self.simple_one.append(factor / item)
self.simple_two.append(factor * item)
if include_compound:
for item in self.base_list:
compound_one.append(((1 + factor) ** (1 / item)) - 1)
compound_two.append(((1 + factor) ** item) - 1)
self.compound_one.append(((1 + factor) ** (1 / item)) - 1)
self.compound_two.append(((1 + factor) ** item) - 1)
if include_complex:
for item in self.base_list:
complex_one.append(item * (((1 + factor) ** (1 / item)) - 1))
complex_two.append(1 / item * (((1 + factor) ** (1 / item)) - 1))
complex_three.append(item * (((1 + factor) ** item) - 1 ))
complex_four.append(1 / item * (((1 + factor) ** item) - 1))
self.complex_one.append(item * (((1 + factor) ** (1 / item)) - 1))
self.complex_two.append(1 / item * (((1 + factor) ** (1 / item)) - 1))
self.complex_three.append(item * (((1 + factor) ** item) - 1 ))
self.complex_four.append(1 / item * (((1 + factor) ** item) - 1))
def print_factors(self, include_simple = True, include_compound = True, include_complex = True):
print("Factors for %s." %(self.variable_name))