Try my challenges today!
Visit my new timer form now:
http://tibasicdev.wikidot.com/forum/t-2213990/best-timer-program-ever
Please visit this new challenges forum for more fun!
[http://tibasicdev.wikidot.com/forum/t-2214321/challenges-2-thel-vadamee]
Here is the challenge:
Part 1 Works with any family, as long is has Inputs and Str1-Str0.
Create a security program with the following expectations for the challenge:
**1. Ask the user for the username and password.
2. store your password/ username into separate strings.
3. Do not, I repeat, DO NOT use any downloads or apps. You may IF there is no other way to complete objective 4.
4. Execute the program when the calculator turns on. (after by pressing the [ON] key.
5. If the password or username is incorrect, shut off the calculator.
6. If there is too many failed attempts, reset ALL RAM. **
Part 2
7 a. Show a "Invalid password or user name" for the security program.
7 b. BE CREATIVE!!!
7 c. Use a "Clear Entries" command to prevent the user for discovering the secret username and/or password.
7 d. Prevent the ERR:BREAK when the user tries to press the [ON] key and tries to drain any/all power from the calc.
8. Any other can be your choices.
9. Back up the program if necessary.
Use these codes for ideas.
PROGRAM:SECURITY
:Clear Entries
:For(I,1,1E99)
:Disp "Input Username."
:Input ":",Str1
:If Str1="hal":Then //if the user is new to TI, he/she may not know about the lower case letters; lowercase letters makes it more secure.
:ClrHome
:Disp "Welcome User 1!!"
:Stop
:Else
:If Str1≠"hal":Then
:ClrHome
:Disp "Invalid!"
:End
:End
Use this hexadecimal code for shutting down the calc.
PROGRAM:ZTESTNOW //I usually name this "Test program" ZTESTNOW because if I found a program online that looks cool, and if it fails, I just delete the code instead of the whole program itself
:AsmPrgm3E01D303FB76FDCB09A6C9
Hehe this was EZ. I used SourceCoder to do this.
PROGRAM:SECURITY
0->|N
Lbl S
Asm(prgmCASE
While 1
Input "USER:",Str1
If Str1!=Str9:Then
Goto O
Else
Input "PASS:",Str2
If Str2=Str0:Then
Goto K
Else
Goto O
End
End
End
Lbl K
ClrHome:"
Stop
Lbl O
Disp "Wrong User/Pass
|N+1->|N
If |N=3:Asm(prgmOFF
Goto S
PROGRAM:OFF
AsmPrgm3E01D303FB76FDCB09A6C9
PROGRAM:CASE
AsmPrgmFDCB24DEC9
Assuming the user doesn't know [2nd]+[MODE]…
Did you do Objective 4?
You know, you could use
:Delvar N
Instead of using
:0→N
(Delvar N is the same as 0→N. P.S., "Delvar" is short for "Delete Variable".
You have some errors. Sorry, I don't have all the time in the world to type it in using the code box, but any bold commands, letters, etc have an error. These include:
ERR:SYNTAX
ERR:ARGUMENT
etc.
PROGRAM:SECURITY
0->|N
Lbl S
Asm(prgmCASE
While 1
Input "USER:",Str1
If Str1!=Str9:Then
Goto O
Else
Input "PASS:",Str2
If Str2=Str0:Then
Goto K
Else
Goto O
End
End
End
Lbl K
ClrHome:"
Stop
Lbl O
Disp "Wrong User/Pass
|N+1->|N
If |N=3:Asm(prgmOFF
Goto S
None of it is bold, and unlike most of the times I don't test code, I did test this one and it does work. The user stores the username into Str9 and the password into Str0. Concerning objective four, you can't run code from start-up using BASIC, you need Start-Up Customization. As for blocking the use of the [ON] key, you need to use Onblock, like Trenly said. I assume both are setup and downloaded for use in the program. This of course will require an 84+CSE or an 84+CE.
OnBlockCE
OnBlockCSE
OnBlock (83+ Family)
I'm quite familiar with Delvar. In this case, it's better to not use Delvar, since it has a bigger token size.
0->|N //18 bytes
versus…
Delvar |N //28 bytes
Having everything setup correctly…
PROGRAM:SECURITY
Asm(prgmONBLOCK //creds to MateoC/Justin Wales, make sure you have the correct version of OnBlock
0->|N
Lbl S
Asm(prgmCASE //creds to whoever made this
While 1
Input "USER:",Str1
If Str1!=Str9:Then
Goto O
Else
Input "PASS:",Str2
If Str2=Str0:Then
Goto K
Else
Goto O
End
End
End
Lbl K
ClrHome:"
Stop
Lbl O
Disp "Wrong User/Pass
|N+1->|N
If |N=3:Asm(prgmOFF
Goto S
PROGRAM:OFF
AsmPrgm3E01D303FB76FDCB09A6C9
PROGRAM:CASE
AsmPrgmFDCB24DEC9
I also assume that you are using SourceCoder to run this…if you aren't and you are typing this, ignore all the indents and type it normally as if there weren't any indents. You should also know that the "|N" is the finance N, not to be confused as a list, and the "!=" is really "≠".
:P
Bonus points if you can find Onblock for the 83/84/*
I used it in the past, so I know it exists.
Hehe, Challenge v2 accpeted!
EDIT:Challenge Complete!
Is that absolute value lines? Or is it list lines?
I recommend you use L₁,L₂ ,L₃,L₄, L₅, L₆ for lists.
Its neither, he said it was the finance variable.
" You should also know that '|N' is
the finance N and not
to be confused with a list. . . "
--Battlesquid
Next challenge time!
Challenge 2
Objective: Create a number guessing game program with the following expectations:
1. Use lower-case letters instead of using stupid, old UPPER-CASE letters.
2. Include a Main Menu
3. Have the game so there are 3 modes. (e.x.: with modes 100, 1000, 10000)
4. Make sure that if the user guesses a specific number in 8 guesses or less, let the user know that he/she has beaten the high score.
5. Include an option in the menu that allows you to look at the corrent high scores for each mode:
EXAMPLE:
---High scores---
Mode 1: 13
Mode 2: 27
Mode 3: 1234567890
6. Make sure that the user is able to reset all/ or specific scores. In a menu or using strings
7. Store your scores into a Matrix.
8. Back up your program in case of a crash.
9. HAVE FUN!!!
10. Post your program to my thread forum.
BONUS:Include a Title explaining the version of the program, and the creators name, and tells how many time you executed the program/how many times you played which modes.
Why do I have to use a matrix? I can write it just as easily using a list.
Because matrixes have cool uses. For example:
{3,9}→dim([A]
{3,9}
When you have several 0's in the matrix, it is easier to post scores to b using a matrix.
How to post scores using a matrix
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
If you made a matrix with a dimension of 3x9, it takes up a lot of kilobytes.
BUT, if you create a matrix with a 3x1 dimension, it will take less bytes and more space to work with.
{3,1}→dim([A]
[13] //score 1
[26] //score 2
[39] //score 3
Example of posting scores:
A→[A](1,1) // The "A" is the variable with the score. Say the score is... 13 guesses. The number
13 will be stored into the var, and the var will be store in to matrix
with the given specific coordinates. (1,1 row 1:column 1)
I know how matricies work, please dont treat me like I know nothing about them since You do not know what I do or do not know. I actually know a lot about matricies and their commands.
But since you were soooo kind to give me an example, let me tell you something. A 3x1 matrix is the same as a 3 element long list. A 1x3 matrix is also the same as a 3 element long list, just that it runs horizontally rather than vertically.
GG. Would have been done sooner, but school is important too…
PROGRAM:GUESS
SetUpEditor
If not(dim(L1:Then
3->dim(L1
{3,1->dim([A]
End
Fill(8,L1
Lbl H
0->C
ClrHome
Menu("Guessmaster+","Easy",1,"Medium",2,"Hard",3,"Scores",S,"Reset Scores",RS,"Quit",Q
Lbl Q
ClrHome
Stop
Lbl RS
Fill(8,L1
Fill(8,[A]
Goto H
Lbl 1
100->N:1->D
Goto G
Lbl 2
1000->N:2->D
Goto G
Lbl 3
10000->N:3->D
Goto G
Lbl G
randInt(1,N->X
While 1
Input "Guess:",G
If G=X:Then
Goto W
Else
If G>X:Disp "Too High!
If G<X:Disp "Too Low!
C+1->C
End
End
Lbl W
ClrHome
Disp "Hooray!"
Disp "Your Score:",C
Pause
If C<L1(D:Then
Disp "NEW HIGH SCORE!!!"
C->L1(D
List>matr(L1,[A]
Pause
End
Goto H
Lbl S
Output(1,1,"Easy
Output(2,1,"Medium
Output(3,1,"Hard
For(X,1,3
Output(X,14,L1(X
End
Pause
Goto H
Typed in SourceCoder 3…