Key Codes
(account deleted) 16 Jul 2017 06:57
This program helps early programmers from not knowing key codes to totally mastering them. Practice makes perfect!
Source Code:
: //for MirageOS
Clear Entries
10→O
ClrHome
1→R
SetUpEditor POINT
3→dim(⌊POINT
⌊POINT(1→C
⌊POINT(2→B
⌊POINT(3→A
If C≥1 and (A=0 or B=0)
Goto CR
Goto P
Lbl M
ClrHome
AxesOff
ZStandard
ZInteger
Menu("K E Y C O D E S","Take Quiz",TQ,"Info",IN,"Points",P,"Options",OP,"Reset",RE,"Quit",Q
Lbl Q
Archive ⌊POINT
ZStandard
AxesOn
ClrHome
Stop
Lbl CR
ClrHome
Disp "Points data","is curropted.","","Please clear","this list:⌊POINT
Stop
Lbl P
SetUpEditor POINT
3→dim(⌊POINT
If 0=⌊POINT(3
randInt(100,300→⌊POINT(3
If 0=⌊POINT(2
1→⌊POINT(2
If R=1:Then
0→R
Goto M
End
For(I,1,3
1→Xmin
⌊POINT(3)→Xmax
End
Text(0,0,"Level -
Text(7,0,"Loading...
Text(57,0,"-/",⌊POINT(3
Horizontal 1
Horizontal 1
If ⌊POINT(1)≥⌊POINT(3)
⌊POINT(3)→⌊POINT(1
For(I,Xmin,Xmax
Pt-On(I,0
End
rand(200
For(I,0,⌊POINT(1
Pt-Off(I,0
Text(57,0,I,"/",⌊POINT(3
End
I/⌊POINT(3)→F
F*100→F
iPart(F→F
Text(50,0,F,"% Complete
⌊POINT(1→A
⌊POINT(2→B
⌊POINT(3→C
Text(0,0,"Level ",⌊POINT(2
If A≥C:Then
Text(20,0,"You gained a new level!
rand(100
For(I,C,0,1
I→⌊POINT(1
Pt-On(I,0
Text(57,0,⌊POINT(1),"/",C,"
End
⌊POINT(2)+1→⌊POINT(2
Text(0,0,"Level ",Ans
" →Str0
For(I,0,10
Str0+Str0→Str0
Text(20,0,Str0
End
Text(50,0,Str0
DelVar Str0
randInt(100,300→⌊POINT(3
0→⌊POINT(1
Goto P
End
Text(7,0,"
Pause
Goto M
Lbl OP
Text(0,0,"Please set the amount of Q's.
Text(15,0,"The more questions you set,
Text(21,0,"the more points you get at
Text(27,0,"the end of the quiz.
Horizontal 24
10→O
Repeat K=105
If O<1
1→O
If O>75
75→O
Text(8,0,"Questions:",O,"
O/75→F
F*100→F
iPart(Ans→F
Text(57,0,F,"%
Repeat K
getKey→K
End
If K=25
O+1→O
If K=34
O-1→O
O/75→F
End
Goto M
Lbl TQ
0→θ
0→P
1→Xmin
101→Xmax
0→F
300→T
0→J
0→θ
1→I
0→G
Lbl PL
I+1→I
I/O→F
F*100→F
iPart(F→F
For(θ,θ,F
Pt-On(θ,31
End
Text(0,0,"Done: ",I
Text(8,0,F,"% Complete.
If F=100
Goto Z0
Horizontal 24
Horizontal 16
Repeat (N>10 and N<16) or (N>20 and N<26) or (N>30 and N<35) or (N>40 and N<45) or (N>50 and N<56) or (N>60 and N<66) or (N>70 and N<76) or (N>80 and N<86) or (N>90 and N<96) or (N>101 and N<106)
randInt(1,105→N
End
Text(28,0,"Key code: ",N,"
Repeat K or T=0
getKey→K
T-1→T
Text(55,0,"Time left: ",T,"
End
300→T
If K=45
Goto SV
If K=N and G=0:Then
Text(16,0,"Correct!
P+2→P
J+1→J
rand(100
Text(16,0,"
End
If K≠N and G=0:Then
Text(16,0,"Incorrect!
rand(100
Text(16,0,"
End
Goto PL
Lbl Z0
rand(100
ClrDraw
ZStandard
ZInteger
Text(0,0,"RESULTS:
Horizontal 24
Text(8,0,"POINTS EARNED: ",P
Text(15,0,"Correct: ",J
P+J→P
I-J
Text(22,0,"Incorrect: ",Ans
Text(29,0,"Penalty: -",Ans
P-Ans→P
If P<0
0→P
Text(57,0,"Total points: ",P
UnArchive ⌊POINT
⌊POINT(1)+P→⌊POINT(1
Pause
Goto M
Lbl SV
ClrDraw
Text(0,0,"Saving earned points...
⌊POINT(1)+P→⌊POINT(1
Goto M
Lbl RE
ClrHome
0→
Lbl XX
If ≥5:Then
ClrHome
Disp "You have to many","incorrect","passwords. You","will now be","returned to the","Menu.
Pause
Goto M
End
Disp "Please input","password to","reset progress.","----------------
Output(6,1,"----------------
Output(8,1,"----------------
"[Your Choice!]→Str1
Output(7,1,"Attempts:"
Output(7,10,
Input ">",Str2
ClrHome
If Str1≠Str2:Then
Output(1,1,"*****NOTICE*****Incorrect password.
rand(100
ClrHome
+1→
Goto XX
End
ClrHome
1→Xmin
101→Xmax
Text(0,0,"RESET ALL OF PROGRESS?
For(I,0,94
For(J,0,6
Pxl-Change(J,I
End:End
Text(8,0,"1:No
Text(15,0,"2:Yes
Text(22,0,"This cannot be undone.
Repeat K=92 or K=93
getKey→K
End
If K=92
Goto M
If K=93
0→⌊POINT(1
0→⌊POINT(2
Text(22,0,"Progress erased.
Pause
Goto M
Lbl IN
Text(0,0,"This quiz is a great game
Text(6,0,"for learning how to know
Text(12,0,"your key codes.
Text(18,0,"HELP:
Text(24,0,"Y=:11
Text(30,0,"ENTER: 105 (10x5)
Text(36,0,"Rows:10, Columns:5
Pause
Goto M