File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
solution_of_expression__sympy__parser Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python3
2
2
# -*- coding: utf-8 -*-
3
3
4
- __author__ = ' ipetrash'
4
+ __author__ = " ipetrash"
5
5
6
6
7
- from sympy .parsing .sympy_parser import parse_expr , standard_transformations , implicit_multiplication_application
7
+ from sympy .parsing .sympy_parser import (
8
+ parse_expr ,
9
+ standard_transformations ,
10
+ implicit_multiplication_application ,
11
+ )
8
12
from sympy import *
9
13
14
+
10
15
input_str = "(x+1)(y+1)+(x+1)y+xy"
11
16
transformations = standard_transformations + (implicit_multiplication_application ,)
12
- print (expand (parse_expr (input_str , transformations = transformations ))) # 3*x*y + x + 2*y + 1
17
+ print (
18
+ expand (parse_expr (input_str , transformations = transformations ))
19
+ )
20
+ # 3*x*y + x + 2*y + 1
You can’t perform that action at this time.
0 commit comments