![]() Your program should look something like this: :0→A :Lbl A :A+1→A :Disp A :If A=100 or A=200 or A=300 or A=400 or A=500 :Menu("GO ON?","YES",A,"NO",B :Goto A :Lbl B This program will check if A=100 or if A=200 or if A=300 and so on. Then you could use the 'and' and 'or' commands, which can be found by pressing 2nd, math, right. Multiple conditions But maybe you want it to count on and make it ask to count on every time after 100 has been added. You could write a whole program on one line, but that's not very handy, because with one accidental press on clear and your program has entirely been removed, except of the name, so I do not recommend that. You can use the : in stead of adding an extra line everywhere in the program. :Else The : can by found by pressing ALPHA, 'point'. Now you can delete the Stop command, because then, if A=100, it will first clear the home screen, then display the text, the pause until you press enter and then there's an Else command, so the commands for this piece end and the program will stop, so your program will look something like this: :0→A :Lbl A :A+1→A :Disp A :If A=100 :Then :ClrHome :Disp "100 HAS BEEN REACHED :Pause :Else :Goto A One way of notation which is very common is an If Then Else condition like this: :If A=.:Then. But if it isn't, the program will skip everything until it reaches Else and then go on. You could also do it like this: :0→A :Lbl A :A+1→A :Disp A :If A=100 :Then :ClrHome :Disp "100 HAS BEEN REACHED :Pause :Stop :Else :Goto A This program checks if A=100. For example make it display '100 has been reached.' Of course you could do that like this: :0→A :Lbl A :A+1→A :Disp A :If A=100 :ClrHome :If A=100 :Disp "100 HAS BEEN REACHED" :If A=100 :Pause :If A=100 :Stop :Goto A but this way your program will be way bigger than it could be. The If Then Else condition But maybe you would like to make the program do more then one thing if it reaches 100. But when A is equal to 100, it will go on with the next line, which says Stop, so the program will stop. Because 1 is not the same as 100, it will skip the next line and go on to Goto A. If the condition is false, it will skip the next line and go on with the line second line down. If it is, if will go on with the line underneath it and then go on with the lines underneath that one. A counting program could look something like this: :0→A :Lbl A :A+1→A :Disp A :Goto A Now you add two lines which make it stop at 100, so you'll get this: :0→A :Lbl A :A+1→A :Disp A :If A=100 :Stop :Goto A (The = can be found by pressing 2nd, math) When using the If condition, it will check if the condition (A=100) is right. The If condition You can already make a program which can count, but how do you stop it from counting when it reaches 100. I will show you the program, explain what it does and explain why you need to add particular commands. I will not build the program step by step like I did in the beginners instructable. Backing up your calculator - a program on your computer, so you'll never lose your programs. Subroutines - how to make a program run another program. Renaming/deleting a program - how to change the name of a program or delete one. pranks - little programs to fool your friends with. chatbot - a program which makes it possible to chat with your calculator. ![]() bouncer - a fun program which is in fact a kind of screen saver. binary - a program which calculates the binary number of a decimal number. quadratic formula - an advanced version of the program you made in the beginners instructable. miles and kilometers - an advanced version of the program you made in the beginners instructable. two screens - an explanation on how to use the graph and home screen. the getKey command - an advanced command which will become really handy. ![]() randomizing - a way to make the calculator put in a random number. loops - an other way of making loops (not with Lbl) 3. ![]() conditions - the if then else condition 2. Also this instructable has been divided into several sections: 1. If you have feedback on my programs or know a better or compacter way of making this program, please comment. When you see something you do not understand, please comment and I'll explain. I know my programs are not the most compact and efficient there is, but they work good, look good and do exactly what you want them to do. But even, if you are no beginner, I still ask you to read the beginners instructable before starting this one, just so you know what you need to be able to. Are you not a beginner, but are you just looking for some more information about how to make more advanced programs, then you are just at the right place. Be sure you are familiar with all commands used in the programs you made in the beginners instructable. I recommend to do the beginners instructable () before starting this instructable. This is the advanced level of programming the TI-84 plus or silver edition.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |