示例#1
0
#Import different modules to be used in our code
from CheckIfoperandisnumber import is_operand
from EvaluationFunction import evaluate
from Datapreprocessing import preprocess
#Take input from user
x = input("Please Enter expression to be evaluated :")
#Perform preprocess function
x = preprocess(x)
#Perform Evaluate function
result = evaluate(x)
print(result)
示例#2
0
文件: app.py 项目: maxboels/VS-Code
def show_post():
    formula = request.data.decode()
    formula = preprocess(formula)
    result = evaluate(formula)
    print(result)
    return str(result)