This commit is contained in:
Sirin Puenggun 2022-12-12 07:56:06 +07:00
parent 35eab53b6a
commit 98a4e822d1

View File

@ -7,7 +7,7 @@ def change_side(equa:str):
Change all left side expression of = sign Change all left side expression of = sign
to right side. to right side.
>>> change_side("x+2-x^2 = 32-x^3") >>> change_side("x+2-x^2 = 32-x^3")
'x+2-x^2-32+x^3=0' 'x+2-x^2-32+x^3'
""" """
temp = '' temp = ''
for i in equa: for i in equa:
@ -134,7 +134,7 @@ def poly_expand(expr:str) -> str:
result += char result += char
continue continue
else: else:
result += f'Polynomial({char})' result += f'Polynomial(\'{char}\')'
# print(expr, result) # print(expr, result)
# Match:Whole poly | Group1:inside Parentheses | Group2:Expo # Match:Whole poly | Group1:inside Parentheses | Group2:Expo