TI83+评估表达式程序
我想在 TI-83+ 中构建一个程序,该程序将提示输入变量 x、y 和 z,然后提示输入有关 x、y 和 z 项的表达式。是否可以提示输入该表达式然后对其进行评估?如果是这样,怎么办?
I would like to build a program in a TI-83+ that will prompt for the variables x, y, and z, and then prompt for an expression on the terms x, y, and z. Is it possible to prompt for that expression and then evaluate it? If so, how?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
TI-Basic 有一个
expr(
命令,可让您将字符串计算为表达式。此处有有关该命令的一些信息:
http://tibasicdev.wikidot.com/expr
通过使用
expr(
命令与存储命令(箭头键)一起,您的程序应该相当容易编写。TI-Basic has an
expr(
command that lets you evaluate strings as expressions.There is some information about the command here:
http://tibasicdev.wikidot.com/expr
By using the
expr(
command along with the store command (the arrow key), your program should be fairly straight forward to write.TI-Basic 为您提供了一组称为
Y-VARS
的变量。任何字符串都可以存储到 Y-VARS 变量中,之后,任何时候使用该变量时,它都会被计算为表达式(就像您在原始字符串)。按VARS
然后按右箭头键即可找到Y-VARS
菜单。Y-VARS
变量的一个示例是Y1
,可在Y-VARS
的FUNCTION
子菜单下找到> 菜单。您的特定情况可以使用
Y-VARS
来解决,如下所示:程序的示例运行可能如下所示:
在本例中,表达式
"Y(X+Z"
> 被评估为3(2+1
),结果为9
。TI-Basic provides you with a set of variables referred to as
Y-VARS
. Any string can be stored to aY-VARS
variable, after witch, any time the variable is used it will be evaluated as an expression (as if you calledexpr
on the original string). theY-VARS
menu is found by pressingVARS
followed by the right arrow key.One example of a
Y-VARS
variable isY1
, found under theFUNCTION
sub-menu of theY-VARS
menu.Your particular situation could be resolved using
Y-VARS
like this:A sample run of the program could look like this:
In this case, the expresion
"Y(X+Z"
has been evaluated as3(2+1
and the result was found to be9
.