I am trying to figure out how to make an Input command where the user has to provide an input in a certain amount of time. I need to do this in order to make a timed times tables practice game
Since on the TI-83+ you cannot delay using the Pause or Wait commands, I use this program to delay for T amount of seconds:
To delay for 3 seconds in a program between displaying 0 and 1, I write this:
PROGRAM:TIME
:3->T
:Disp 0
:prgmDELAY
:Disp 1
The problem is that I cannot combine the prgmDELAY with an Input to limit the time that the user has to provide an input. Any help will be much appreciated.
So, I love calculator programming (and when I say love, I mean "do during math class because I'm bored"), and I've done a lot of fun stuff over the ages with my calculator. I'm interested in how active this site is, if I think they'd get some interest, I can transcribe some of my better programs.
Let's see, I've made chess (utilizing the lower-case letters), a bunch of mathematical programs (prime numbers, inverse chi-squared, Heron's formula, what have you). I've nabbed a few programs from my brother too, like a nifty little game where you dodge asteroids, that gets progressively harder over time (he made Snake too, but that's too laggy to really be used). I made my own version of snake in which the snake doesn't grow over time, but I lost that after dropping my calculator without backing it up :/
Anyway, yeah. This sub doesn't look too active right now, but I'd be interested to see how many other people are interested in this kind of thing.
So I got sick/bored this past week and have never programmed anything more complex than a quadratic equation solver in TIBASIC. So I got to work on this. This being the hunk of code below (Define statements and comments included to hopefully increase readability, but no guarantees) Unfortunately, I'm not the most experienced mathematician, and the methods I used to do base conversion are A. Insane and B. memory intensive because it has to convert the number into base 10 before it can do anything (this is a limitation of my brain as much as anything, really).
Basically, is there a way I could have written this to be less terrible?
#define input A
#define inBase B
#define outBase C
#define inTen E
#define output W
//Set all values used by program to 0 at start
0→input
0→inBase
0→outBase
0→D
0→inTen
0→K
0→F
0→output
//describe how it works
Disp "THIS CONVERTS"
Disp "BASES FROM 0-10"
Disp "WITH INTEGERS"
//Wait for the user to press a key
Repeat getKey
End
//get the number to convert
Disp "Number to Con?"
Input input
//get the base of the number
Disp "Orig. Base?"
Input inBase
//get the desired base
Disp "New Base? "
Input outBase
//stores the input in seperate variable so I am free to manipulate it
input→D
//make positive
abs(D)→D
//Truncate fractional parts
D-fPart(D)→D
//ouput zero and end the program if the input is zero
If D=0
Then
Disp 0
Stop
End
//calculation
//This While loop is an obtuse way of converting a number from any base to base 10.
//It does this by taking individual digits of a number and multiplying them by the number's original base raised to it's "place"
//Honestly that's probably a terrible idea.
While D>0
//following line obtains the first digit of a number(BECAUSE TIBASIC IS TOO COOL FOR MOD AMIRITE?)
D/(D/(10^fPart(log(D))))-fPart(D/(D/(10^fPart(log(D)))))→K
//add the value of the number*inBase^power
K*inBase^(log(D)-fPart(log(D)))+inTen→inTen
//this line truncates said digit
D-(K*₁₀^(log(D)-fPart(log(D))))→D
End
//After the above while loop, the input has been changed to a base 10 number and stored in inTen,
//all that's left is to convert it to the desired base and output it
//reset temp values we will use again
0→D
0→K
//stores our "input" in D, for a similar function of above
inTen→D
While D>0
//finds the place that we need to be at in the new number
logBASE(D,outBase)-fPart(logBASE(D,outBase)→K
//finds how many we need in that place
D/(outBase^K)-fPart(D/outBase^K)→F
//adds the correct digit in the correct place to the output
F*(10^K)+output→output
//subtracts what it added to output from D (in correct baeses obv.)
D-(outBase^K)F→D
End
If abs(input)≠input
output*⁻1→output
Disp output
I've been programming on my calculator for ~2 or 3 years now, but I still haven't figured out if it's possible to set up a list and then get back one specific number from it. Is this even possible or will I need to find a workaround?
This is a program I made called "GUESS". The calculator thinks of a number, and you have to guess it in as few guesses as possible!
'ClrHome
Disp "GUESSER"
Output(8,1," HIT ENTER"
Pause
ClrHome
Disp "GUESS A NUMBER B","ETWEEN 1 AND 99"
Output(8,1," HIT ENTER"
Pause
0→S
rand →A
A*100→B
int(B)→N
Lbl 4
ClrHome
Disp "GUESS!"
Prompt G
If G>N:Then
Goto 1
Else:If G<N:Then
Goto 2
Else:If G=N:Then
Goto 3
Lbl 1
ClrHome
S+1→S
Disp "TOO HIGH!"
Output(8,1," HIT ENTER"
Pause
ClrHome
Goto 4
Lbl 2
ClrHome
S+1→S
Disp "TOO LOW!"
Output(8,1," HIT ENTER"
Pause
ClrHome
Goto 4
Lbl 3
ClrHome
S+1→S
Disp "YOU GOT IT!"
Output(8,1," HIT ENTER"
Pause
ClrHome
Goto 7
Lbl 7
Disp "YOU GUSSED IN",S,"GUESS(ES)"
Output(8,1," HIT ENTER"
Pause
ClrHome
Stop'
It would be very cool to have another program the opposite as this; the user thinks of a number and the calculator tries to guess it. That's a bit too advanced for me, it would be awesome if anyone here could make it! :D Feedback is appreciated <3
Hey all, for some more complicated programs I find that it would be easier to code them on a computer rather than on the calculator itself. I was wondering what you guys usually use? Right now I use tokens which works well but I haven't found an auto complete feature which is the biggest thing I'm looking for. What do you guys use/suggest?
Feel free to tell me what to do to make this better, also subscribed programmers that post good links/programs might be promoted to moderator!!! Thanks for reading!
I've been working on a project to make useful math programs more accessible for TI-84 users, and I finally got my website up and running. It's completely free and focuses on simple, easy-to-use programs that can actually help with coursework.
I know there are tons of program repositories out there, but I wanted to create something clean and beginner-friendly. No ads, no paywall, just helpful programs for students and anyone else using TI-84 calculators.
Would love to get some feedback from this community - what programs do you find most useful? What am I missing that would be helpful to include?
POLYROOT is free to use, modify, and share. The full TI-BASIC source is included below.
So I made this working program this semester for my System Dynamics class (finding poles), and I wanted to share it with you guys. Raw code for each version (depends on preference) posted at bottom.
Nerd information:
I used a copious amount of AI while developing this program. One of the ideas that came out of that was using the Durand-Kerner method to solve for the roots of a polynomial of essentially any degree the calculator can reasonably handle.
Durand-Kerner is an iterative numerical algorithm that approximates all of the roots of a polynomial simultaneously.
For each estimated root r_i, the program repeatedly applies:
r_i = r_i - P(r_i) / PRODUCT(r_i - r_j), for all j != i
where P(r_i) is the polynomial evaluated at the current estimate r_i.
In simpler terms, every root estimate is repeatedly corrected based on the value of the polynomial at that point and the positions of all the other current root estimates. The process continues until the estimates stop changing significantly.
This also allows the program to find complex roots, which created one of the first major problems I ran into. The TI-84 Plus CE cannot store complex values inside matrices, even while the calculator is in a+bi mode.
I borrowed an idea from a program called SIMULT2, which a previous student in my circuits class made and which our professor provided to us. That program used lists to store complex values while drawing something on-screen that looked like a matrix.
I adapted that idea for POLYROOT. The original coefficient-entry system allowed the user to move left and right through the cells with the arrow keys and correct previous entries. Unfortunately, it was also slow and required an annoying extra Enter press.
I eventually replaced that with a simpler system where one Enter immediately moves to the next coefficient.
I also added an option to use an already-existing coefficient matrix [A], so the program does not have to erase and rebuild the coefficients every time.
Another problem was numerical output. Durand-Kerner might produce something such as 1.999999999 instead of 2, or an extremely tiny real or imaginary component instead of exactly 0. I added several cleanup passes that round values near integers and eliminate components below certain tolerances.
I then added detection for repeated roots and their multiplicities.
That became Version 1.
Version 2 mainly focused on quality-of-life improvements, especially replacing the slower arrow-key/double-Enter coefficient-entry system with the current single-Enter system.
After choosing which version I preferred, I did some additional cleanup, which became the version of POLYROOT I currently use.
That's basically how this monstrosity came to exist.
I didn't find anything online about a program that will convert a matrix of observed values into expected values for the Chi-Squared test. Here is a program that will iterate though matrix [A] and put the expected values in matrix [B]. Takes over the following variables: X, Y, R, C, J, K, I, L₆, and of course [B].
"Get the number of rows/columns"
dim([A])→L₆
L₆(1)→R
L₆(2)→C
"Get the sum of the matrix [A]"
0→N
For(X,1,R,1)
For(Y,1,C,1)
[A](X,Y)+N→N
End
End
"For each cell in [A], calculate the expected value"
For(X,1,R,1)
For(Y,1,C,1)
"Sum row X"
0→J
For(I,1,C,1)
[A](X,I)+J→J
End
"Sum column Y"
0→K
For(I,1,R,1)
[A](I,Y)+K→K
End
"Calculate the expected value, store in [B]"
(J*K)/N→[B](X,Y)
End
End
χ²-Test([A],[B])
Hello! I’m a bit new to Basic programming and I don’t have a cord to download games yet, so I wanted to make a Choose your own adventure esque Minecraft game and I was wondering if anyone has tried this before. If you have please give me tips and if possible share the source code please
:ClrHome
:Disp "SPEED
:Disp "1) SLOW
:Disp "2) NORMAL
:Disp "3) FAST
:DelVar Z8→X
:Repeat 2>abs(Ans-2
:getKey-91→S
:End
:ClrHome
:Disp "SCORE:
:Repeat K=45 or max(X=L1
:Output(8,1," // 16 spaces
:2→F
:seq(3I-int(3rand),I,1,5→L1
:Repeat K=45 or F=8
:getKey→K
:min(15,max(2,X-(Ans=24)+(Ans=26→X
:Output(8,Ans-1," O // 1 space
:Output(F,1," // 16 spaces
:F+1→F
:For(I,1,5
:Output(Ans,L1(I),"V
:End
:Z+S→Z
:Output(1,7,Ans
:rand(4-S
:End
:End
:DelVar L1ClrHome
:Disp "YOUR SCORE:
:Pause Z
:ClrHome:"
This is giving me a domain error for no reason at :Output(Ans,L1(I),"V , i might be dumb but i cant see why. Help???
I am trying to write an equation in the graphing menu so that it will be stored somewhere, and then for later use I want to be able to copy this equation and paste it into the solver menu. If anybody has any tips how to do this that would be great! (I know you can solve for the zeros graphically but these answers aren't accurate enough.)
Which one is better at programming, the TI-84 Plus or the TI-89 (Titanium)? I ordered a TI-89 and I don't know if I made a mistake. I mainly will use it for programming probably.
One reason I'm asking is because I see not a lot of people writing programs for the TI-89. I only see people do cool stuff on the 84.