Assignment 1 Questions
Download Code
Question 1
The interest rates are the following; 5, 5.5, 7, 15, 17.8
Question 2
Gas prices are between $2.00 and $3.00.
Question 3
Gas prices are not between $2.00 and $3.00.
Question 4
$ReturnValue = 2 == 3;
$ReturnValue is FALSE.
$ReturnValue = "2" + "3";
$ReturnValue is 23.
$ReturnValue = 2 >= 3;
$ReturnValue is FALSE.
$ReturnValue = 2 <= 3;
$ReturnValue is TRUE.
$ReturnValue = 2 + 3;
$ReturnValue is 5.
$ReturnValue = (2 >= 3) && (2 > 3);
$ReturnValue is FALSE.
$ReturnValue = (2 >= 3) || (2 > 3);
$ReturnValue is FALSE.
Question 5
The value contains a number and is even.
Question 6
A global variable can be used by all functions inside the code. A local variable cannot because it will only work inside the function it is defined in.
$Global global can be used here. $Local local shows up too.
See? $Global global can still be used even here. However, $Local will not show up.