In this problem, you will use two if-else blocks to decide if a number is positive, negative, or zero. Add a nested if-else block and each of the output blocks to the program. Then, test your program by changing the variable value to a negative number, positive number, and zero. You should expect the output to be the following when value is -2.
-2 is a negative number.
Coding:
Hotkey Shortcuts
Move BlocksUP or DOWN or TAB
Run Program ALT + SHIFT + R
Stop Program ALT + SHIFT + S
Hide Tray ALT + SHIFT + X
Zoom In ALT + +
Zoom Out ALT + -
Open Help ALT + SHIFT + H
Navigate to Tray ALT + 1
Navigate to Blocks ALT + 2
Enter Navigation Mode SHIFT + ENTER
Switch to Next Tab CTRL + ]
Switch to Previous TabCTRL + [
Blocks
Hint
Great job!
Try again
The program already finds a positive number so add a nested if block to the else scope. Change the boolean expression to find if the number is negative and add the output blocks for each of the remaining outcomes. Then run the program with the value variable having a value of -2, 0, and 2 to test your program.