bbc up
This commit is contained in:
parent
da8425942f
commit
5bbd3d8b26
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ def bc(formula):
|
||||||
def pure(formula):
|
def pure(formula):
|
||||||
while(formula[0] == '(' or (formula[0] == '-' and formula[1] == '-')):
|
while(formula[0] == '(' or (formula[0] == '-' and formula[1] == '-')):
|
||||||
if formula[0] == '(':
|
if formula[0] == '(':
|
||||||
formula == formula[1:]
|
formula = formula[1:]
|
||||||
else:
|
else:
|
||||||
formula = formula[2:]
|
formula = formula[2:]
|
||||||
while(formula[len(formula) - 1] == ')'):
|
while(formula[len(formula) - 1] == ')'):
|
||||||
|
@ -51,4 +51,4 @@ def cal(f1,f2,flag):
|
||||||
'*':lambda x,y: x*y,
|
'*':lambda x,y: x*y,
|
||||||
'/':lambda x,y: x/y
|
'/':lambda x,y: x/y
|
||||||
}
|
}
|
||||||
return do[flag](f1,f2)
|
return do[flag](f1,f2)
|
||||||
|
|
Loading…
Reference in a new issue