Introduction
TI-BASIC is the built-in program language that comes with the TI-83/84+ calculators
Optional Resources
1. TI-83 Plus Flash Debugger -> for running programs
2. TI Graph link -> For writing & saving programs
-or-
a TI-83/84 Plus calculator -> writes and runs programs
Conditions
Conditions are what make programming so useful. If x is true, do this, otherwise, do something else.
In TI-BASIC, there is no boolean variable. 0 is false, anything else is true. Because of this, some advanced techniques can be implemented that can't be implemented with normal boolean variables, but I won't discuss those in this tutorial.
Keywords to know:
Syntax:Code:If Then Else End And Or Xor
The "Else" and "<False Actions>" can be omitted if you only want "True Actions"Code:If <condition> Then <True Actions> Else <False Actions> End
Sample:
This should help you be able to answer the previous challenge question.Code::If X=0 :Then :4→X :End
If you have already written the answer, here is the solution to the previous challenge question:
And Or and XorCode:prgmGUESSING :25→X :Input A, "Guess Number: " :If A=X :Then :Disp "That's Right!" :Else :Disp "Wrong!" :End
Frankly, I don't remember what Xor does, and I've never used it in 4.5 years of programming. And and Or, on the other hand, are in almost every one of my programs.
Use And and Or when you want to have multiple conditions.
For example:
'And' is true when all conditions are trueCode::If X<Y And X>0 :Then :0→X :Else :Y-1→X :End
'And' is false when any condition is false
'Or' is true when any condition is true
'Or' is false when all conditions are false
Challenge Question Part 1:
Change the above code so that it tells the user whether or not their guess is too high or low.
Challenge Question Part 2:
Change the above code for the Guessing Game so that it asks the user for the answer until they get it correct. (add on to CQ Part 1)
Last edited by exfyre; 08-28-2009 at 06:51 PM.
Very cool! Do you have a cable to hook up your TI to your computer? If so, did you build it yourself? That was the cool thing to do in the nerd group at my school, so we all built our own cables.
+rep
Hah. I do have my own cable, but I didn't make it. I actually don't know how to make one (you should post a tut).
I can't remember, that was 8-10 years ago, lol. There are plenty of schematics on the web though.![]()
Another nice one. +rep
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks