Calculators Ti89: display text and variable

  • Thread starter Thread starter jaredmt
  • Start date Start date
  • Tags Tags
    Text Variable
Click For Summary
To display both text and a variable on the same line in a TI-89 calculator, the correct approach involves using the concatenation operator "&" instead of the "+" operator. The expression should be formatted as "the answer is " & b, where 'b' is the variable. This ensures that the text and the variable are combined correctly in the output. The issue with using "+" is that the TI-89 interprets it as a multiplication request, leading to incorrect results. Converting the variable to a string is not necessary when using the "&" operator, as it handles the concatenation of text and variables directly.
jaredmt
Messages
120
Reaction score
0
with ti89, how can i display both text and variable on the same line?
i tried
Code:
"the answer is " + b
and a bunch of other things but nothing has worked so far

edit:
it said somewhere on tnhe internet that i can do:
Code:
"the answer is " b
but when i run the program all you see is
7 "the answer is "
instead of
the answer is 7
then when go back to edit the code it is automatically set to
Code:
"the answer is "*b
 
Last edited:
Computer science news on Phys.org
I think the TI-89 treats "expA expB" as a request to multiply expA and expB together.

It's been awhile but what I suggest doing is converting b to a string, then adding it to your normal string. So like it would be

"the answer is " + string(b)

"string" may not be the name of the conversion function but there must be some way to go number->string.
 
ok that doesn't work either but i finally did find out. pretty much what you have, except instead of + you have to use &
 
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
Replies
16
Views
3K
Replies
14
Views
2K
Replies
10
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
4
Views
6K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 34 ·
2
Replies
34
Views
4K
Replies
21
Views
5K
Replies
9
Views
2K