IVIP Sample Question
IVIP Sample Question
1. When the user clicks “when green flag clicked” button, it will _________
a. runs the script
b. runs the block inside condition block
c. points sprite into specified direction
d. none of above
a.
b.
c.
d.
a.
b.
c.
d. None of these
11. Supposed the joke list consists of items [1, 2, 3, 4], what is the value of
a. 2
b. 3
c. 1
d. 4
12. From figure 1 below, choose the correct coordinate for the centre of the screen.
Figure 1
a. (X:0, Y:0)
b. (X:240, Y:0)
c. (X:0, Y:-180)
d. (X:240, Y:-180)
13. From figure 2 below, which pallet they are belongs to:
Figure 2
a. control
b. pen
c. sensing
d. variable
14. Based on the figure 2 in question 13 previously, which block represent delay timing
block.
a. wait (10) secs
b. if then else
c. forever
d. repeat (10)
15. There are several ways to display data to the user in Snap! Which of the following is
NOT CORRECT? a.
a.
b.
c.
d.
16. Broadcasting and receiving a message is procedure in Snap!. Choose what you can
do with this procedure in Snap!.
a. All of these
b. Hold a conversation
c. Respond to events
d. Control game play
Figure 3
a. Run
b. Launch
c. Call
d. All of these
X Y X AND Y X OR Y NOT X
False False False False True
False True False True True
True False False True False
True True True True False
[12 marks]
2. Given i = 2, x = 6, j = 3, k = 6, y = 5 , z = 2, a=4, b=5, c=2. SOLVE the arithmetic
equation below:
a. b %=4
5 %= 4 = 1
b. a /=4
4 /= 4 = 1
c. c *=5
2 *= 5 = 10
[6 marks]
d. a = x * ( y % z ) % j + k
a=6*(5%2)%3+6
a=6*1%3+6
a=6
e. r = x % i + y - j * k
r=6%2+5–3*6
r = 0 + 5 – 18
r = -13
f. m = x * (y% z) % (3 * 4)
m = 6 * ( 5 % 2 ) % (3 * 4)
m= 6 * 1 % (12)
m = 6 % 12
m=6
g. n = ( x * z ) / 2 ( 3 * y )
n=(6*2)/2(3*5)
n = ( 12 ) / 2 (15)
n = 6 (15)
n = 90
[12 marks]
Question 2 (30 marks)
a) Solve the problem using the problem analysis to identify the input, process, and
output (IPO) and write a pseudo-code
a. To iterate and display numbers from 1 to 50 in reverse order.
Start
REPEAT
count -= 1
UNTIL count = 0
End
[15 marks]
b) Write pseudo code that will perform the following.
a. Read in 5 separate numbers.
b. Calculate the average of the five numbers.
c. Find the smallest (minimum) and largest (maximum) of the five entered
numbers.
Start
IF n1 >= n2
maximum is n1
ELSE
maximum is n2
ENDIF
IF n3 >= maximum
maximum is n3
ENDIF
IF n4 >= maximum
maximum is n4
ENDIF
IF n5 >= maximum
maximum is n5
ENDIF
IF n1 <= n2
minimum is n1
ELSE
minimum is n2
ENDIF
IF n3 <= minimum
minimum is n3
ENDIF
IF n4 <= minimum
minimum is n4
ENDIF
IF n5 <= minimum
minimum is n5
ENDIF
End
[15 marks]