Illustrations of if statement:
illustrations of running this script:
Please enter a number: -4.2
The sqrt of 4.2 is 2.0
Please enter a number: 1.44
The sqrt of 1.4 is 1.2
In this situation, the action of the if statement was a single assignment statement.
The action can be several numbers of valid statements. For illustration, we might wish to print a note to the user to state that the number entered was being changed.
Please enter a number: -25
OK, we will use the absolute value
The sqrt of 25.0 is 5.0
Note that the use of two single quotes in the disp statement in order to print the one single quote.