iv. Select Variables Menu
1. Drag and Drop Set Command > Select Down arrow > select Sum
2. Select Operators > Drag and Drop Addition Command > Place in set to spot in the Set Command
3. Place num1 + num2 variables in the addition space
4. Output the Answer
4. If/Then Statements
If/Then Statement: is a comparison statement that when true will carry out specific lines of code; if the
condition is false the code linked with the condition will be ignored
There is 2 options for creating an if statement
- I : Allows the user to place a comparison statement (<,>, or =) into the space next to if > if the comparison is
true it will run the code placed in the space below the if; if false the code will be not run
- : If/Else 1 of 2 things will happen
o User will 1
st
place a comparison statement into the space provided
o if the comparison statement is true then it will run the code in the space provided below the if and
ignore the code placed in the else
o if the comparison is false then the code below the if will be ignored and the code placed with the else
will be run.
NOTE: with Comparisons there is only < and > symbols, not <= or >=. So when setting a comparison
always add or subtract your comparison value by 1.
For Example if I want to see if sum less than or equal to 60 my code would be sum < 61