F.4CA Winnie Leung (22) HARDER PROBLEMS: 6) Since in line 4, 5 --- P=-5, Q=3 therefore in line 6 --- P= -5 * 3 =-15 and in line 7 --- Q=-15/3 = -5 and in line 8 --- P=-15/-5 = 3. Therefore the value of P is 3. 7) The answer is (E). ~~~ if (not(5=3*2+1)) or (4<3) then A:= A+3 ~~~ For the first half of this conditional statement, i.e. (not(5=3*2+1)), R.H.S.= 5 L.H.S.=3*2+1= 7 Hence (not(5=3*2+1)) is true. Since the conditional statement is an "or" statement, then when either one condition is true, the whole condition will be true. As a result, it does not need to prove (4<3). And the prefect answer is (E). 8) The answer is C. When X>=0, the computer will read: X is positive Y = 1 Z = X * Y Hence the value of Z must be equal to X. When X<0, the computer will read: X is negative Y = -1 Z = X * Y Hence the value of Z must be equal to absolute value of X. As a result, the value of Z will be equal to the absolute value of X .