plus sign and colon symbols

lawrence shared this question 1 month ago
Answered

need to know why need the plus signs and colon symbol as found in the below command : also what and how to use the "+" sign and colon( " ) symbol. ( need examples) Any help or suggestion is much appreciated. Thanks


Sequence("f_{" + (i + 2) + "} = f_{" + (i + 1) + "} + f_{" + (i) + "}", i, 1, 10)

Comments (3)

photo
1

suppose a=3.14 then "the value of a is "+a means the value of a is 3.14

photo
1

It's how exact text and symbols are combined in one string. So if you want te refer to a name and a variable index in a sequence, the name (in this case a function to be generated) is typed between colons. But the functions in the saquence get different indexes. These are defined by the variable i. So every time you use this variable in the sequence command you have to close the colon, add a plus sign etc.You can compare it with writing dynamic text in a textbox. In fact it't the same, but in a more userfriendly interface. Exact texts are put together with variables. The code behind this all is the same as in the command of your question.

chris

photo
1

And another addition:

© 2019 International GeoGebra Institute