File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -157,15 +157,15 @@ def __multiply(self):
157157
158158 # Overwrite __str__ for print(); Shows A, B and A*B
159159 def __str__ (self ):
160- a = "A = " + " + " .join (
161- f"{ coef } *x^{ i } " for coef , i in enumerate (self .polyA [: self .len_A ])
162- )
163- b = "B = " + " + " .join (
164- f"{ coef } *x^{ i } " for coef , i in enumerate (self .polyB [: self .len_B ])
165- )
166- c = "A*B = " + " + " .join (
167- f"{ coef } *x^{ i } " for coef , i in enumerate (self .product )
168- )
160+ a = "A = " + " + " .join (
161+ f"{ coef } *x^{ i } " for i , coef in enumerate (self .polyA [: self .len_A ])
162+ )
163+ b = "B = " + " + " .join (
164+ f"{ coef } *x^{ i } " for i , coef in enumerate (self .polyB [: self .len_B ])
165+ )
166+ c = "A*B = " + " + " .join (
167+ f"{ coef } *x^{ i } " for i , coef in enumerate (self .product )
168+ )
169169
170170 return f"{ a } \n { b } \n { c } "
171171
You can’t perform that action at this time.
0 commit comments