Expanding on what Firepup said:
Original:
Code:
If 1+1=2 AND 2+2=3:Disp "Hey there"
The output would be "Hey there", since both are true.
Correct:
Code:
If 1+1=2 AND 1+2=3:Disp "Hey there"
The output would be "Hey there", since both are true. No, 2+2 does not equal 3
Code:
If 1+1=1 OR 1+1=1:Disp "This is odd"
There would be no output since neither are true, but if you did this:
Code:
If 1+1=2 OR 1+1=1:Disp "This is odd"
The output would be "This is odd" since one is true. This also works:
Code:
If 1+1=2 OR 1+2=3:Disp "Yay calcs"
We get "Yay calcs" because OR can work when at least one is true, but also when multiple are true.
Code:
If 1+1=8 XOR 1+1=2:Disp "Yay"
Output is "Yay", since one is true. XOR is like OR, but it means exclusive or. This means that only ONE can be true, not both. With OR, at least one must be true, but both can be true as well. For example:
Code:
If 1+1=2 XOR 3+2=5:Disp "Sad"
There is no output since both are true.
Code:
If 1+1=5 NOR 1+1=6:Disp "NOR is an operator"
Output is "NOR is an operator" because neither is true. If you did this:
Code:
If 1+1=2 NOR 2+1=1:Disp "Hello"
or this:
Code:
If 1+1=2 NOR 2+2=4:Disp "Hello"
there is no output since either one or both is true. (I don't think NOR is in TI-BASIC)
Code:
If not(1+1=2):Disp "yo"
In TI-BASIC, not is used differently. There is no output here since 1+1=2 is true. If we did this:
Code:
If not(1+2=8):Disp "TIny is cool"
We get the output "TIny is cool" because TIny is cool 1+2=8 is false.
EDIT
Didn't see the previous post