Programming on the TI-84, Nspire and Nspire CAS

The TI-Nspire comes with a great deal of programming tools, but after many updates, it is still crippled by the lack of an input statement.

Without input, what you have is a collection of functions. You have to run and re-run functions with new parameters each time to enter a list.

Of course they provide their spreadsheet, which requires the user to tab to a new cell after each input. Then to go to the first cell of the new row, you need to arrow down then left for several arrow presses until you return to the first cell of the row below. Once all your data is input, TI says you are given two choices: either run your function on your spreadsheet (the output going into a new column), or run your program in calculator mode, using the variables from your spreadsheet as parameters.

Running a TI-84 with an input command, I input data into multiple lists, pressing only the enter key until the end of the list (list length was the first data entered). These lists ended up in the table, namely L1 to L6. To correct my input, I could always return to the table and correct  anything I needed. If the list consisted of multiple items for each row in a table, that was no problem. The program I wrote took care of the tabulation and did the calculations on columns, storing the output in new columns, as the code below illustrates.

I can only see the Nspire becoming most useful after the raw data is fully tabulated. I can see how formerly complex calculations and metadata generation becomes greatly simplified once the table is in place, using the Nspire. I have appreciated how cutting and pasting, and the invocation of spreadsheet-based functions greatly resemble that of Microsoft Excel. Before we appreciate the math power it holds, it is comparatively a slog, with having to navigate back and forth across a spreadsheet.
__________________________
This is a TI-84 Program to input student marks based on 4 categories and calculate statistics on class evaluations. Indentation is for presentation only. You cannot indent code in the TI-84.

VARIABLE DICTIONARY
K: Knowledge out of            A: Application out of
T: Thinking out of             C: Communication out of
N: # of tests                  I: Counts test #
L: Knowledge mark              B: Application mark
U: Thinking mark               D: Communication mark
Z: Used in calculating student's percentage
Y: Amount of mark accounted for so far
L1, L2, L3, ... L6
   ... arrays which hold raw scores or mid-stage calculations,
   each array element accessed through counter I. These are the
   lists stored and tabulated as they appear on the TI-84.

PURPOSE:
This program attempts to convert the 4-mark grade awarded to
students to a percentage overall grade. While many teachers
consider this a "no-no", students appreciate it, and have
a better feel for what the mark means.

If the user chooses not to enter a certain category, then s/he
should enter "0" when prompted at the beginning for what that
category is out of. For example, if the teacher chooses to omit
the category "Application", then s/he should enter "0" in response
to

     AP OUT OF? 0

The user is never prompted for an application mark again.

This program allows for missing sections. Up to 3 of the four
categories can be missing and an adequate percentage will be
calculated, assuming:
     Knowledge 30%
     Application 30%
     Thinking 20%
     Communication 20%
PROGRAM: MARKS

Clear Entries
ClrAllLists
Input "NO OF TESTS? ", N
Input "KN OUT OF? ", K
Input "AP OUT OF? ", A
Input "TH OUT OF? ", T
Input "COMM OUT OF? ", C
For(I, 1, N, 1)
   0->L
   0->B
   0->U
   0->D
   0->Y
   0->Z
   If (K>0)
      Then
         Input "K? ", L
         (L/K)*.3->L1(I)
         L1(I)->Z
         .3->Y
   End
   If (A>0)
      Then
         Input "A? ", B
         (B/A)*.3->L2(I)
         Z+L2(I)->Z
         Y+.3->Y
   End
   If (T>0)
      Then
         Input "T? ", U
         (U/T)*.2->L3(I)
         Z+L3(I)->Z
         Y+.2->Y
   End
   If (C>0)
      Then
         Input "C? ", D
         (D/C)*.2->L4(I)
         Z+L4(I)->Z
         Y+.2->Y
   End
   Disp "MARK: ", (Z/Y)*100
   (Z/Y)->L5(I)
End
(L5*100)->L6
1-Var Stats L6

UPDATE: I had to type in the above code by hand, since no Windows-based editor is available for this coding, and there is no editable file for this code that I am aware of, except through the calculator itself. In the process, I spotted some errors, which have now been corrected.  In the old code, “Y” appeared to be counting a possible total of 1.2 instead of 1. Also, the Communication mark was based on 30% instead of 20%.  Since I have no serious intention to maintain the code on this blog entry, send me a comment if you have any other difficulties with this code.

~~~~~~~~~~~~~~~~~~~~~~
One of the serious disadvantages of programming the TI-84 is the utter lack of syntax structuring for the purposes of readability, such as indentation. Notice also that the IF statement takes up two lines. THEN seems to be treated as though it marks the beginning of a statement block, ended by END.

But, I suppose in the service of reducing the keyword count, END seems to end any statement block, such as a FOR loop. There is also another problem with not being able to move backward to correct data until after the program has finished execution.

While readability was an issue with the TI-84, I am still willing to live with that for the want of an INPUT statement in the NSPIRE. This code allows for efficient keying in of long lists of data.

The TI-Inspire is not what it is cracked up to be

84_pad_max192wThis is the TI-Nspire, the calculator that promises to foment lazier minds in students than ever before. I teach math, and I look at all these new calculators with jaundiced eye. Ever see the new caclulators these days (non-graphing) which can come up with exact answers to sum and difference functions of trig angles? This is stuff I want my students to do. Those calculators are banned from tests in our school.

But, OK, I’ll pull in my horns for the moment. This next-generation calculator, which has an interchangeable keyboard so it can also emulate a TI-84+, does most of the TI-84 operations with better graphics, but with more menus and steps, with some new features thrown in.

But there is missing stuff in the Inspire which the TI-84 makes obvious. For one thing, there is no “startup” program. That seems trite, but it is not. In a school setting, a startup program can put an image on the screen which can identify the calculator number and the school name. It is hard to change or erase, which makes it a good addition to a physical marking on the calculator (an etched serial number on the case, for example) to identify the calculator and keep easy track in case a student may carry one of these things and it gets mixed up (this happens sometimes). My personal graphing calculators can do this (TI-84+ and TI-83+), all except the TI-Nspire. The TI-84+ “personality” of the Nspire can do it, except that it flashes the image on for only a split second. It doesn’t wait for a keypress.

But what is more pressing is that the Nspire has no way (yet) to find the intersection of two graphs. The method I am using to find this, and the x-intercept does not seem like a surefire method, and does not seem as intuitive.

The programming language with the Inspire is more sophisticated than with that of the TI-84. It allows for user-defined functions, for example. But it does not have an “INPUT” command to my knowledge. The TI-84 has one, but not the Nspire. The NSpire has an I/O menu, and the only selection there is “DISP”, which is like BASIC’s PRINT command. Without a means for input from the keyboard, the programming functions are pretty useless, unless you want to call up one of their spreadsheets and fill things in manually. In the TI-84, I would be prompted for a number of different inputs and I would allow the calculator to figure out which row/column my input could go in. With the TI-84, I could program statistics commands, fill in tables, and do row/column calculations, all inside my program. I would often use the last row in the table after the program executed to give a bar chart of that data. This has been very useful to get a picture of class mark distributions, for example.

I have to amend what I have said earlier that there is no way to run the code. You can run the code in calculator mode, but without an INPUT statement, you need to pass parameters to it as if it were a function. Of course, I would guess the NSpire’s functions (which are new to the NSpire) work the same way, meaning there is probably little syntactic difference between calling functions versus programs in my view. I have written my first function and ran it in calculator mode, and it works as advertised. But no input.

So far, they are making customers wait for a long time before they put out these new features. And so far, I consider the lack of programmability make the NSpire less useful than the TI-84. The Nspire has been available to the mass market for about 2 years, and it looks like we are going to be made to wait a lot longer for features like these. What is the reason they put out a $200 product that is only half-finished in many areas? I purchased it expecting it to be at least as complete in itself as my other TI calculators. But I have come to the conclusion that it is still a work in progress.

For now, I am not shelving my TI84+ just yet, and am still doing most of my math on it. And for the record, I don’t feel totally ripped off. After all, they do update their operating system and allow us to update our calculators with new firmware upgrades. And some of those upgrades will change the way you do things before the firmware upgrade. Maybe one of these days, one of those changes will be the inclusion of an input statement, and the making of a more genuine programming language.

I attended a conference on the TI-NSpire recently, and one thing I heard teachers say is that kids pick up on the technology a lot faster than us. But of course, there is a motivator. The calculator just hands you the answers, which relieves the student of all the bother of having to think. Well, if you’re a kid who ought to be learning the concepts, that must feel REALLY motivating. Thinking is hard. Pushing buttons is easy. The kids that they had there helping us out at the conference were as stumped as I was when they were presented with my NSpire, having only worked on the CAS. Eventually, I got it to do most of the things we were doing. I hope they were being paid to be there. Looks like they were there as cheap, untrained labour.

At any rate, as for us teachers, we are really focusing on the concepts. My concern is whether this new gadget will deliver the concepts to them better than if I worked examples out by hand on the board. My focus is not on the calculator, it’s on the curriculum. We can change questions to make people think about what the calculator is doing and why, but we are moving away from doing the algebra. The question “why” is a good one, and I make sure I get people to think about things like “what does the log of a number give us?” and so on, every chance I get. But people always need to be drilled on algebra, all the time, every day. Letting a caclulator do this work for us can give the impression that it isn’t as important as it used to be. Algebra is important, even if you will never use it again, because it helps kids develop analytical skills needed in everyday life.