User:Alphabetagamma

From Wikipedia, the free encyclopedia

Hello, all...

This is my lonely little user page. I think I'll fill it up with programs for the TI 83+ SE...

I ACCEPT NO LIABILITY FOR ANYTHING WHATSOEVER!




Notes: I use a ## for the "not equal to" symbol. I use CURT(X) for the cube root of X. I use SQRT(X) for the square root of X. Some of these programs refer to a "prgmALLPREFD". This is just a program that sets the calculator to my prefered settings. Don't worry about it.


Contents

[edit] The Unit Conversion Programs

Author: Lucas Brown of Poway, California.

[edit] The Cubic Formula

Author: Lucas Brown of Poway, California.

PROGRAM:CUBEFORM

:ClrHome
:Disp "AX^3+BX^2+CX+D=0"
:Prompt A
:Prompt B
:Prompt C
:Prompt D
:D/A==>D
:C/A==>C
:B/A==>B
:1==>A
:(BC/6-B^3/27-D/2)==>E
:(CURT(E+SQRT(E^2+(C/3-B^2/9)^3))+CURT(E-SQRT(E^2+(C/3-B^2/81)^3))-B/3)==>F
:ClrHome
:Disp "ONE SOLUTION IS:",F

[edit] FACTOR

Author: Lucas Brown of Poway, California.

PROGRAM:FACTOR

:ClrHome
:Input A
:If A>10^11:Disp "ERR: NUMBER TO O":Disp "LARGE.RTRNS WILL":Disp "BE ERRONEOUS.":Stop
:Disp A
:DelVar B
:Lbl C
:B+1==>B
:If B>SQRT(A)
:Then
:0==>B
:Disp "THAT'S ALL":Stop
:End
:If (A/B)=int(A/B)
:Then
:Disp "":Disp B,(A/B):Pause:Goto C
:Else
:Goto C
:End

[edit] PRIMEFAC, the prime factorization program

Author:

[edit] PRIMEIDR, the test for a prime

Author: Lucas Brown of Poway, California.

:ClrHome
:Input A
:ClrHome
:Disp A
:1==>B
:Lbl C
:B+1==>B
:If B>SQRT(A)
:Then
:1==>B
:Disp "PRIME!':Stop
:End
:If (A/B)=int(A/B)
:Then
:1==>B
:Disp "COMPOSITE.":Stop
:Else
:Goto C
:End

[edit] The Quadratic formula

Author: Lucas Brown of Poway, California.

[edit] A version of the game "Snake"

Author: Lucas Brown of Poway, California.

You are the head of the snake. Eat the dot that appears somewhere onscreen. Avoid yourself, the score, and the walls.

PROGRAM:SNAKE

:Full
:RectGC
:CoordOff
:GridOff
:AxesOff
:LabelOff
:ExprOff
:ZDecimal
:ClrDraw
:Line(-4.7,3.1,4.7,3.1)
:Line(4.7,3.1,4.7,-3.1)
:Line(4.7,-3.1,-4.7,-3.1)
:Line(-4.7,-3.1,-4.7,3.1)
:26==>L
:0==>S
:5==>X
:5==>Y
:Lbl SE
:randInt(5,55)==>A
:randInt(5,90)==>B
:If pxl-Test(A,B)=1:Goto SE
:Pxl-On(A,B)
:Lbl ST
:Pxl-On(X,Y)
:S+1==>S
:0==>K
:getKey==>K
:If K##0:K==>L
:If L=24:Y-1==>Y
:If L=25:X-1==>X
:If L=26:Y+1==>Y
:If L=34:X+1==>X
:Text(55,2,S)
:If X=A and Y=B
:Then
:S+int(100*(S^(1/3)))==>S
:Goto SE
:End
:If pxl-Test(X,Y)=1:Goto ED
:Goto ST
:Lbl ED
:Disp "GAME OVER",S
:Pause
:prgmALLPREFD

[edit] A maze game

Author: Lucas Brown of Poway, California.

You are the blinking dot. Control with arrow keys. Avoid the walls. Avoid the score. Get to the top or the left walls.

PROGRAM:MAZE

:Full
:RectGC
:CoordOff
:GridOff
:AxesOff
:LabelOff
:ExprOff
:ZDecimal
:ClrDraw
:Line(-4.7,3.1,4.7,3.1)
:Line(4.7,3.1,4.7,-3.1)
:Line(4.7,-3.1,-4.7,-3.1)
:Line(-4.7,-3.1,-4.7,3.1)
:0==>S
:31==>x
:47==>Y
:Lbl SE
:S+1==>S
:randInt(11,53)==>A
:randInt(11,85)==>B
:If A=X or B=Y:Goto SE
:randInt(0,1)==>C
:If C=0
:Then
:Pxl-On(A-5,B):Pxl-On(A-4,B):Pxl-On(A-3,B):Pxl-On(A-2,B):Pxl-On(A-1,B):Pxl-On(A,B)
:Pxl-On(A+1,B):Pxl-On(A+2,B):Pxl-On(A+3,B):Pxl-On(A+4,B):Pxl-On(A+5,B)
:End
:If C=1
:Then
:Pxl-On(A,B-5):Pxl-On(A,B-4):Pxl-On(A,B-3):Pxl-On(A,B-2):Pxl-On(A,B-1):Pxl-On(A,B)
:Pxl-On(A,B+1):Pxl-On(A,B+2):Pxl-On(A,B+3):Pxl-On(A,B+4):Pxl-On(A,B+5)
:End
:If S=100
:Then
:0==>s
:Goto ST
:End
:Goto SE
:0==>T
:Lbl ST
:Pxl-On(X,Y)
:S+1==>S
:Repeat K
:T+1==>T
:If T<35:Pxl-On(X,Y)
:If T>34:Pxl-Off(X,Y)
:If T=40:0==>T
:getKey==>K
:End
:K==>L:Pxl-Off(X,Y)
:If L=24:Y-1==>Y
:If L=25:X-1==>X
:If L=26:Y+1==>Y
:If L=34:X+1==>X
:Text(55,2,S)
:If X=(0 or 61) or Y=(0 or 93):Goto EE
:If pxl-Test(X,Y)=1:Goto ED
:Goto ST
:Lbl ED
:Disp "GAME OVER",S
:Pause
:prgmALLPREFD
:Lbl EE
:Disp "YOU WON!",S
:Pause
:prgmALLPREFD