Interpreters
Executing code for more accurate computation
python qa_simple.py --question "What is 578921 days * 12312 miles/day?"7223849252 milesEvaluating Python expressions
from fvalues import F
from ice.recipe import recipe
def eval_python(expression: str) -> str:
try:
result = eval(expression)
except Exception as e:
result = F(f"Error: {e}")
return str(result)
async def answer_by_computation(question: str):
return eval_python(question)
recipe.main(answer_by_computation)Choosing what to evaluate

Using the results of evaluation

Exercises
Last updated