Professional Documents
Culture Documents
Computer Science - II
Computer Science - II
(b) --------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------
(ac) --------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------
(3 marks)
[Total = 6 marks]
contd.....to page 2
2
Grade 9 Computer Science - II contd.....from page 1
2. The following fields are available in a database named PERSONAL_DETAILS.
PERSONAL_DETAIL
Name
NIC
DOB
Address
Gender
Contact No
(ii) Give a suitable data type and a validation rule for each of the given field.
(12 marks)
[Total = 14 marks]
contd.....to page 3
3
Grade 9 Computer Science – II contd.....from page 2
3. Write down the commands to draw the following shape.
Start Stop
---------------------------------------------------- ----------------------------------------------------
---------------------------------------------------- ----------------------------------------------------
---------------------------------------------------- ----------------------------------------------------
---------------------------------------------------- ----------------------------------------------------
---------------------------------------------------- ----------------------------------------------------
---------------------------------------------------- ----------------------------------------------------
---------------------------------------------------- ----------------------------------------------------
---------------------------------------------------- ----------------------------------------------------
---------------------------------------------------- ----------------------------------------------------
---------------------------------------------------- ----------------------------------------------------
---------------------------------------------------- ----------------------------------------------------
---------------------------------------------------- ----------------------------------------------------
---------------------------------------------------- ----------------------------------------------------
[Total = 10 marks]
contd.....to page 4
4
Grade 9 Computer Science – II contd.....from page 3
4. Study the given flow chart and trace the table by using the following test data.
42, 6400, –80
START
INPUT number
count 1
T number
number number/10
END
is number Yes
<17 OUTPUT
T, count
No
count count + 1
[Total = 8 marks]
contd.....to page 5
5
Grade 9 Computer Science – II contd.....from page 4
5. Find out three errors and state the corection piece of code.
(i) Input the number of people buying some tickets at $5 each. A 10 % discount is
given if three or more tickets are bought. The printed tickets are output.
Liner no : ------------------------------------------------------------------------------------
Correction : ------------------------------------------------------------------------------------
Line no : -------------------------------------------------------------------------------------
Correction : -------------------------------------------------------------------------------------
Line no : ------------------------------------------------------------------------------------
Correction : ------------------------------------------------------------------------------------
(6 marks)
contd.....to page 6
6
Grade 9 Computer Science – II contd.....from page 5
(ii) The average marks of the 500 students in a school are being entered. Write an algorithm
using pseudo code, which input all 500 average marks and output how many students
were more than 75 or less than 75 average marks.
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
(6 marks)
[Total = 12 marks]
END
Ref : CH