This is my HQ for the mental arithmetic trainer, so that not all the issues will be spread around the forum. The reason to create this program is for me to get back into coding. Especially TI basic first. At the moment I am reading some books how you can calculate with some tricks in your head some very big numbers. I was always good, but want to get better. I am using tricks from the book "Secrets of Mental Math" by Arthur Benjamin and Michael Shermer. But also other online sources. I know there are apps out there, but this is for me to train my Basic skills.

Her is how the program will work.

1. an opening screen

2. menu

- explaining each trick with section to practice
- training mode where you can chose which technique you want to practice (same as practice without explanation)
- competition mode where different difficulty levels can be set with highs cores. e.g answer time (speed), 3 life system (most answers in a row), etc.
- high score table with results of performance

3. exit screen

The first question I ask myself is if I code everything into one file or create sub files that can be called and exited back to main file.

How much graphics I want to implement. I will write it for the TI-84 Plus CE-T, but want to also make versions for all other 84 models.

I will get started with an old fashioned flow chart. I will do it in a way so that I can add more modules as soon they become available, without disrupting the general program structure.

That's it for the moment. I you like to comment and contribute, please feel free.

Next post: first version of flow chart

Moving code to the top for easy access. Each new version will be updated here now:

# First playable version 1.0.9. Maths trick explanation and practice mode ready for 11 maths tricks.+

Many thanks go to Trenly & UBERhelp (see exit screen). Next challenge coding about 50 trick units with explanations how they work. And last, the game with highscoring. Timeframe: 1 week.

UPDATES:

Version 1.0.1. Four parts working 1 1 1 and 1 1 2 (will automatically go to practice mode after wait 25 command, no need for flags) and 2 1 1 and 2 1 2.

Version 1.0.2. Main architecture, menus, functionality, GUI, ok.

Version 1.0.3. 2 tricks ready

Version 1.0.4. squaring tricks numbers ending in 5 (1 1 3 or 2 1 3) plus squaring any 2 digit numbers (1 1 4 or 2 1 4)

Version 1.0.5. multplying any 2 digit numbers (1 1 5 or 2 1 5

Version 1.0.6. multplying any 3 digit numbers (1 1 6 or 2 1 6

Version 1.0.7. adding 2 and 3 digit numbers (1 2 1 or 2 2 1 & 1 2 2 or 2 2 2

Version 1.0.8. subtracting 2 and 3 digit numbers (1 4 1 or 2 2 2 & 2 4 1 or 2 4 2

Version 1.0.8. cubing 2-digit numbers (11-19) (1 1 7 or 2 1 7)

Will be updating once or twice a day.

I will add to this code modules as soon I have them ready. Version will be changed accordingly.

```
"main menu"
Lbl MM
ClrHome
Menu(" MENU "," TRICK EXPLANATION",TE," TRICK PRACTICE",TP," GAME MODE",GM," HIGH SCORE",HS,"QUIT",QT)
"1st level menu"
"trick explanation"
Lbl TE
ClrHome
Menu(" TRICK EXPLANATION "," MULTIPLICATION",MP," ADDITION",AD," DIVISION",DV," SUBTRACTION",ST,"MAIN MENU",MM)
Lbl MP
ClrHome
Menu(" MULTIPLICATION ","Same 10s, end dgt sum 10",AA,"Multiply 2dgt nmbr by 11",AB,"Square 2dgt nmbr ends 5",AC,"Square any 2digit number",AF,"Multiply any 2dgt number",AG,"Multiply any 3dgt number",AH,"Cube 2-digit (11-19)",AI," Next Page",MQ,"Previous Menu",TE)
Lbl MQ
ClrHome
Menu(" MULTIPLICATION "," TRICK 8",AJ," TRICK 9",AK," TRICK 10",AL," Previous Page",MP,"Previous Menu",TE)
Lbl AD
ClrHome
Menu(" ADDITION ","2-digit addition (easy)",BA,"3-digit addition",BB," TRICK 3",BC," TRICK 4",BD," TRICK 5",BE," TRICK 6",BF," TRICK 7",BG," Next Page",AE,"Previous Menu",TE)
Lbl AE
ClrHome
Menu(" ADDITION "," TRICK 8",BH," TRICK 9",BI," TRICK 10",BJ," Previous Page",AD,"Previous Menu",TE)
Lbl DV
ClrHome
Menu(" DIVISION "," TRICK 1",DA," TRICK 2",DB," TRICK 3",DC," TRICK 4",DD," TRICK 5",DE," TRICK 6",DF," TRICK 7",DG," Next Page",DW,"Previous Menu",TE)
Lbl DW
ClrHome
Menu(" DIVISION "," TRICK 8",DH," TRICK 9",DI," TRICK 10",DJ," Previous Page",DV,"Previous Menu",TE)
Lbl ST
ClrHome
Menu(" SUBTRACTION ","2-digit subtraction",SA,"3-digit subtraction",SB," TRICK 3",SC," TRICK 4",SD," TRICK 5",SE," TRICK 6",SF," TRICK 7",SG," Next Page",SS,"Previous Menu",TE)
Lbl SS
ClrHome
Menu(" SUBTRACTION "," TRICK 8",SH," TRICK 9",SI," TRICK 10",SJ," Previous Page",ST,"Previous Menu",TE)
"1st level menu"
"trick practice"
Lbl TP
ClrHome
Menu(" TRICK PRACTICE "," MULTIPLICATION",MU," ADDITION",MD," DIVISION",MI," SUBTRACTION",MS,"MAIN MENU",MM)
Lbl MU
ClrHome
Menu(" MULTIPLICATION ","Same 10s, end dgt sum 10",PA,"Multiply 2dgt nmbr by 11",PB,"Square 2dgt nmbr ends 5",PC,"Square any 2digit number",PD,"Multiply any 2dgt number",PE,"Multiply any 3dgt number",PF,"Cube 2-digit (11-19)",PG," Next Page",MV,"Previous Menu",TP)
Lbl MV
ClrHome
Menu(" MULTIPLICATION "," TRICK 8",PH," TRICK 9",PI," TRICK 10",PJ," Previous Page",MU,"Previous Menu",TP)
Lbl MD
ClrHome
Menu(" ADDITION ","2-digit addition (easy)",BA,"3-digit addition",BB," TRICK 3",BC," TRICK 4",BD," TRICK 5",BE," TRICK 6",BF," TRICK 7",BG," Next Page",ME,"Previous Menu",TE)
Lbl ME
ClrHome
Menu(" ADDITION "," TRICK 8",BH," TRICK 9",BI," TRICK 10",BJ," Previous Page",MD,"Previous Menu",TP)
Lbl MI
ClrHome
Menu(" DIVISION "," TRICK 1",PA," TRICK 2",PB," TRICK 3",PC," TRICK 4",PD," TRICK 5",PE," TRICK 6",PF," TRICK 7",PG," Next Page",MJ,"Previous Menu",TP)
Lbl MJ
ClrHome
Menu(" DIVISION "," TRICK 8",PH," TRICK 9",PI," TRICK 10",PJ," Previous Page",MI,"Previous Menu",TP)
Lbl MS
ClrHome
Menu(" SUBTRACTION ","2-digit subtraction",ZA,"3-digit subtraction",ZB," TRICK 3",ZC," TRICK 4",ZD," TRICK 5",ZE," TRICK 6",ZF," TRICK 7",ZG," Next Page",MT,"Previous Menu",TP)
Lbl MT
ClrHome
Menu(" SUBTRACTION "," TRICK 8",ZH," TRICK 9",ZI," TRICK 10",ZJ," Previous Page",MS,"Previous Menu",TP)
"1st level menu"
"game mode"
Lbl GM
ClrHome
Menu(" GAME MODE "," TIMED GAME",GA," 3 LIFE GAME",GB," LEVEL GAME",GC,"MAIN MENU",MM)
Lbl HS
ClrHome
Output(1,9,"HIGH SCORE")
Output(3,3,"MIK 3500 SAM 1200")
Output(4,3,"TOM 3000 CAT 0900")
Output(5,3,"SIK 2900 ARC 0500")
Output(6,3,"POT 2600 PAM 0100")
Output(7,3,"RIK 1400 LUC 0050")
Output(9,3,"PRESS KEY FOR MAIN MENU")
Repeat getKey
End
Goto MM
Lbl QT
ClrHome
Output(1,10,"ABOUT")
Output(3,3,"DESIGNER: BENARIUS")
Output(4,3,"DATE: 14.12.18")
Output(5,3,"VERSION: 1.0.9")
Output(7,3,"THANKS TO:TRENLY &")
Output(8,3," UBERhelp")
Output(10,3,"THANKS FOR PLAYING")
Wait 5
ClrHome
Stop
"2nd level menus"
"trick explanation"
"multiplication"
Lbl AA
ClrHome
Output(1,1," ENDING DIGITS ADD TO 10")
Output(2,1,"AND HAVE SAME 1st DIGITS")
Output(3,1," e.g. 27 x 23")
Output(4,1," 20*(20+10)+(7x3)")
Output(5,1," 600 + 21")
Output(6,1,"Answer: 621")
Output(7,1," e.g. 49 x 41")
Output(8,1," 40*(40+10)+(9*1)")
Output(9,1," 2000 + 9")
Output(10,1,"Answer: 2009")
Wait 25
Goto PA
Lbl AB
ClrHome
Output(1,1," MULTIPLY ANY 2-DIGIT ")
Output(2,1," NUMBER BY 11")
Output(3,1," e.g. 32 x 11")
Output(4,1,"add digits for center nmbr.")
Output(5,1," 3+2=5")
Output(6,1," 3 5 2")
Output(7,1,"Answer: 352")
Output(8,1,"more: 45x11=495 27x11=281")
Output(9,1,"carry over: 79x11=7 16 9")
Output(10,1," 7+1 6 9-> 869")
Wait 25
Goto PB
Lbl AC
ClrHome
Output(1,1," SQUARING NUMBERS")
Output(2,1," ENDING IN 5")
Output(3,1," e.g. 35 x 35")
Output(4,1,"add 1 to 1st digit add 25")
Output(5,1," 3*(3+1)+(5x5)")
Output(6,1," 12 <-> 25")
Output(7,1,"Answer: 1225")
Output(8,1,"e.g. 65x65=4225 25x25=625")
Output(9,1," 6x(7)25 2x(3)25")
Output(10,1," 4225 625")
Wait 25
Goto PC
Lbl AF
ClrHome
Output(1,1," SQUARING ANY 2 DIGIT")
Output(2,1," NUMBERS")
Output(3,1," e.g. 13 x 13")
Output(4,1,"difference to tenner is 3")
Output(5,1," take 13-3 and 13+3")
Output(6,1," multiply 10 and 16")
Output(7,1," add square of difference 3")
Output(8,1," (10 x 16) + (3 x 3)")
Output(9,1,"Answer: 169")
Output(10,1,"e.g.56 dif4 60x52+4x4=3136")
Wait 25
Goto PD
Lbl AG
Output(1,1,"MULTIPLY ANY 2 DGT NUMBER")
Output(2,1," e.g. 73")
Output(3,1," x 64")
Output(4,1,"sum of last digit 3x4=1(2)")
Output(5,1,"cros mltply add carry over")
Output(6,1," (7x4)+(3x6)+1 ")
Output(7,1," 28+18+1=4(7)")
Output(8,1,"sum tenner add carry over")
Output(9,1," (7x6)+4=46")
Output(10,1,"Answer: 4672")
Wait 25
Goto PE
Lbl AH
Output(1,1,"MULTIPLY ANY 3 DGT NUMBER")
Output(2,1," e.g. 764")
Output(3,1," x 389")
Output(4,1,"sum of last digit 3x4=3(6)")
Output(5,1,"cros mltply add carry over")
Output(6,1,"(6x9)+(4x8)+3,54+32+3=8(9)")
Output(7,1,"cros mltply add carry over")
Output(8,1,"(7x9)+(6x8)+(4x3)+8=13(1)")
Output(9,1,"(7x8)+(6x3)+13=8(7)")
Output(10,1,"(7x3)+8=29 Answer: 297196")
Wait 25
Goto PF
Lbl AI
ClrHome
Output(1,1," CUBING 2 DIGIT")
Output(2,1," NUMBERS (11-19)")
Output(3,1," e.g. 13 x 13 x 13")
Output(4,1,"difference to tenner is 3")
Output(5,1," take 13-3 and 13+3")
Output(6,1,"multiply 10 x 13 x 16")
Output(7,1," add (3x3) x 13")
Output(8,1," 2080 + 117")
Output(9,1,"")
Output(10,1,"Answer: 2197")
Wait 25
Goto PG
Lbl AJ
Lbl AK
Lbl AL
"addition"
Lbl BA
Output(1,1," 2-DIGIT ADDITION (EASY) ")
Output(2,1,"")
Output(3,1,"Simplify and break into")
Output(4,1,"smaller parts")
Output(5,1,"")
Output(6,1,"e.g. 48")
Output(7,1," +39 (30+9)")
Output(8,1,"")
Output(9,1," 78 + 9")
Output(10,1,"Answer: 87 ")
Wait 25
Goto DA
Lbl BB
Output(1,1," 3-DIGIT ADDITION (EASY) ")
Output(2,1,"")
Output(3,1,"Simplify and break into")
Output(4,1,"smaller parts")
Output(5,1,"e.g. 457")
Output(6,1," +368(300+60+8)")
Output(7,1," 757+60+8")
Output(8,1," 817+8")
Output(9,1,"")
Output(10,1,"Answer: 825 ")
Wait 25
Goto DB
Lbl BC
Lbl BD
Lbl BE
Lbl BF
Lbl BG
Lbl BH
Lbl BI
Lbl BJ
"division"
Lbl OA
Lbl OB
Lbl OC
Lbl OD
Lbl OE
Lbl OF
Lbl OG
Lbl OH
Lbl OI
Lbl OJ
"subtraction"
Lbl SA
Output(1,1," 2-DIGIT SUBTRACTION")
Output(2,1,"")
Output(3,1,"Simplify and break into")
Output(4,1,"smaller parts")
Output(5,1,"")
Output(6,1,"e.g. 68")
Output(7,1," -26 (20+6)")
Output(8,1,"")
Output(9,1," 48 - 6")
Output(10,1,"Answer: 42 ")
Wait 25
Goto ZA
Lbl SB
Output(1,1," 3-DIGIT SUBTRACTION")
Output(2,1,"")
Output(3,1,"Simplify and break into")
Output(4,1,"smaller parts")
Output(5,1,"e.g. 678")
Output(6,1," -346(300+40+6)")
Output(7,1," 778-(40+6")
Output(8,1," 738-6")
Output(9,1,"")
Output(10,1,"Answer: 732")
Wait 25
Goto ZB
Lbl SC
Lbl SD
Lbl SE
Lbl SF
Lbl SG
Lbl SH
Lbl SI
Lbl SJ
"trick practice"
"multiplication"
Lbl PA
Repeat not(K)
ClrHome
randInt(11,99→A
10iPart(.1A)+10(1-fPart(.1A→H
Output(3,1,"Multiply
Output(3,10,A
Output(3,13,"x
Output(3,15,H
Input "Answer:",J
ClrHome
Output(4,7,"Booo…
If J=AH:Output(4,7,"Bravo
Pause
Disp "Play Again?
Input "Yes(1) No(0)",K
End
Goto TP
Lbl PB
Repeat not(K)
ClrHome
randInt(1,99→A
Output(3,1,"Multiply
Output(3,10,A
Output(3,13,"x
Output(3,15,11
Input "Answer:",J
ClrHome
Output(4,7,"Booo…
If J=11A:Output(4,7,"Bravo
Pause
Disp "Play Again?
Input "Yes(1) No(0)",K
End
Goto TP
Lbl PC
Repeat not(K)
ClrHome
randInt(1,9→A
10A+5→I
Output(3,1,"Multiply
Output(3,10,I
Output(3,13,"x
Output(3,15,I
Input "Answer:",J
ClrHome
Output(4,7,"Booo…
If J=(II):Output(4,7,"Bravo
Pause
Disp "Play Again?
Input "Yes(1) No(0)",K
End
Goto TP
Lbl PD
Repeat not(K)
ClrHome
randInt(11,99→A
Output(3,1,"Multiply
Output(3,10,A
Output(3,13,"x
Output(3,15,A
Input "Answer:",J
ClrHome
Output(4,7,"Booo…
If J=(AA):Output(4,7,"Bravo
Pause
Disp "Play Again?
Input "Yes(1) No(0)",K
End
Goto TP
Lbl PE
Repeat not(K)
ClrHome
randInt(11,99→A
randInt(11,99→B
Output(3,1,"Multiply
Output(3,10,A
Output(4,9,"x
Output(4,10,B
Input "Answer:",J
ClrHome
Output(4,7,"Booo…
If J=(AB):Output(4,7,"Bravo
Pause
Disp "Play Again?
Input "Yes(1) No(0)",K
End
Goto TP
Lbl PF
Repeat not(K)
ClrHome
randInt(101,999→A
randInt(101,999→B
Output(3,1,"Multiply
Output(3,10,A
Output(4,9,"x
Output(4,10,B
Input "Answer:",J
ClrHome
Output(4,7,"Booo…
If J=(AB):Output(4,7,"Bravo
Pause
Disp "Play Again?
Input "Yes(1) No(0)",K
End
Goto TP
Lbl PG
Repeat not(K)
ClrHome
randInt(11,19→A
Output(3,1,"Cube
Output(3,10,A
Output(4,9,"x
Output(4,10,A
Output(5,9,"x
Output(5,10,A
Input "Answer:",J
ClrHome
Output(4,7,"Booo…
If J=(AAA):Output(4,7,"Bravo
Pause
Disp "Play Again?
Input "Yes(1) No(0)",K
End
Goto TP
Lbl PH
Lbl PI
Lbl PJ
"addition"
Lbl DA
Repeat not(K)
ClrHome
randInt(11,99→A
randInt(11,99→B
Output(3,1,"Add
Output(3,10,A
Output(3,13,"+
Output(3,15,B
Input "Answer:",J
ClrHome
Output(4,7,"Booo…
If J=(A+B):Output(4,7,"Bravo
Pause
Disp "Play Again?
Input "Yes(1) No(0)",K
End
Goto TP
Lbl DB
Repeat not(K)
ClrHome
randInt(101,999→A
randInt(101,999→B
Output(3,1,"Add
Output(3,9,A
Output(3,13,"+
Output(3,15,B
Input "Answer:",J
ClrHome
Output(4,7,"Booo…
If J=(A+B):Output(4,7,"Bravo
Pause
Disp "Play Again?
Input "Yes(1) No(0)",K
End
Goto TP
Lbl DC
Lbl DD
Lbl DE
Lbl DF
Lbl DG
Lbl DH
Lbl DI
Lbl DJ
"division"
Lbl PA
Lbl PB
Lbl PC
Lbl PD
Lbl PE
Lbl PF
Lbl PG
Lbl PH
Lbl PI
Lbl PJ
"subtraction"
Lbl ZA
Repeat not(K)
ClrHome
randInt(11,99→A
randInt(11,99→B
If A>B:Then
Output(3,1,"Add
Output(3,10,A
Output(3,13,"-
Output(3,15,B
Input "Answer:",J
ClrHome
Output(4,7,"Booo…
If J=(A-B):Output(4,7,"Bravo
Pause
Disp "Play Again?
Input "Yes(1) No(0)",K
End
End
Goto TP
Lbl ZB
Repeat not(K)
ClrHome
randInt(101,999→A
randInt(101,999→B
If A>B:Then
Output(3,1,"Add
Output(3,9,A
Output(3,13,"-
Output(3,15,B
Input "Answer:",J
ClrHome
Output(4,7,"Booo…
If J=(A-B):Output(4,7,"Bravo
Pause
Disp "Play Again?
Input "Yes(1) No(0)",K
End
End
Goto TP
Lbl ZC
Lbl ZD
Lbl ZE
Lbl ZF
Lbl ZG
Lbl ZH
Lbl ZI
Lbl ZJ
"game mode"
Lbl GA
Lbl GB
Lbl GC
```

…indistinctness is my forte…

J.M.W. Turner