Hello! My name is REXDEUMGLADITORUS! You may call me REXDEUM or Little Buddy (H.S. nickname). I was wondering if anyone can help me write a code for my TI-84, I would like to write a code that asks if I am in calculus (already have that part good) and then depending on my answer (i yould like a yes or no that you can press, but any way would be fine) it would put the mode to radians (for yes) or degrees (for no). If anyone can help me with this I will be really appreciative.
Thank you!
-REXDEUMGLADITORUS
Well, we're not gonna write the code for you, but we can help! So how much TI-BASIC do you actually know? Do you know what a string is?
Not much, I know how to have it say my name. that is it. I am looking for someone to guide me, its no fun if they do it for you. But i am at a loss and can not find anything of help online. I asked one of my teachers and he said that I need to define a variable. Can we start with that?
ClrHome:Delvar K
While K=0
getkey→K
If K=92:Then // this is the yes portion
Radian
End
If K=71:Then // this is the no portion
Degree
End
End
This is not working, but I might be doing it wrong. At least there is no error message.
menu("CALCULUS?","YES",1,"NO",2
lbl 1
Radian
end
lbl 2
Degree
end
The Silver Phantom welcomes you
I am getting a syntax error, but this is what I had in mind, thank you.
That program is throwing a syntax error because those ends should be stops. The program is looking for loops or an If…Then…End. You never end a label with End. If you get really good, then you rarely use labels too :).
ah, right, i forgot a stop in the first.
The Silver Phantom welcomes you
You could also use retur instead of stop…
They do the same thing in this case.
Do you still want me to show you my example and teach you some nifty little tricks, or at least the basics of BASIC?
Please c: I would love to learn how to learn the basics.
Okay then, let's learn BASIC! So, a variable is a letter that has a numerical value, such as A=3. A number plus A would equal the same number plus 3. Alright? Got it?
Now, you see that little button by the 1? The one that says STO? When you click it, an arrow shows up, right? Well, thus it's what you use to DEFINE A VARIABLE! So, let's go back to the A=3. What if A=3, but I want A to become 5? We use STO! This command: 5->A stores the value 5 to the variable A. Got it all? I read it as "5 goes to A."
Even cooler, what if we wanted to increase the value off A by one? Yup, we use STO again! By using this: A+1->A we tell the calculator that the current value of A plus one goes to the new value of A!
Make sure you really understand this, because variables and STO are EXTREMELY important later on.
Yes I understand that, we did something with sto in calculus, what is next?
So, let's learn about the exclusive programming commands. We'll start with Input, Prompt, and Disp.
Input: Input is an extremely helpful command for getting data from the user. The syntax is as follows:
Input [Text,]Variable/String
Say you wanted to give the user a choice and have them pick a value for A. You'd use the line: Input A to let the user choose.
Prompt: This is probably used best in solving formulas. The syntax is this:
Prompt Variable [, variable]…[, variable]
Say we did the famous quadratic formula and wanted the user to type in values of A, B, and C. We'd do: Prompt A,B,C to have the user define variable A, B, and C right after each other.
Disp: This is used to display numbers and strings on the home screen. It's really simple. For example, to show the value of A, we just type in: Disp A ….But be careful! If you typed in: Disp "A" It would display the letter A, not it's value!
With this, you'd be able to make your degrees/radians program!
Thank you! what would be the next thing?
Rather than teach you by putting a lot of forum posts, perhaps this Command Index could help. There are also tutorials of how to use every command on this site. Most commands are fairly self explanatory as to their purpose. However the command index can be used to figure out why you get an error. Welcome to TIBD!
Thank you, but I enjoy this way better. For if I have a question I can get the answer and if I am still not understanding it I can get it explained differently. But thank you for showing me the index in case I forget something :)
Feel free to start new threads about specific questions! Those threads help everybody learn new ways to program a certain code and help you learn. However, a full tutorial of basic is nearly impossible to complete on one thread, and besides, it adds extra posts to the recent posts page. Most users are happy to help, but don't want to see a full tutorial on the basic they already know. Most of them can give a better understanding of certain commands, and specific help with one command. That way, you can skip what you already know, and go right to what you want to know!
just to help you out a bit, we have a full guide here that will guide you through most of the programming tid bits in TI-basic. any questions can be asked in the forums or in command page discussions at the bottom of the page.
The Silver Phantom welcomes you