解析并运算简单的数学单词问题,将答案作为整数返回。
将两个数字相加
What is 5 plus 13?
运算为 18.
处理大数和负数。
现在,执行其他三个操作.
What is 7 minus 5?
2
What is 6 multiplied by 4?
24
What is 25 divided by 5?
五
按顺序处理一组操作.
由于这些是口头语言问题,从左到右运算表达式,忽略了典型的操作顺序(乘法优先级比加法高)。
What is 5 plus 13 plus 6?
24
What is 3 plus 2 multiplied by 3?
15(不是 9)
如果你愿意,处理指数.
What is 2 raised to the 5th power?
32
灵感来自 Extreme Startup 游戏中的一个生成的问题.https://github.com/rchatley/extreme_startup