Professional Documents
Culture Documents
ACFrOgCfpi9F7nbA m6IEnB20HmqcxfwYGl4tiR0ZkuHxvAk136OlNR0eihp8guD7uNLDqEY2jfD-lzuLXrP o1CPvxOj4eWDMF1kza6isxrYBdl MCjGARQeLRii-KJZWX PPD qwaB5lUO9bWD
ACFrOgCfpi9F7nbA m6IEnB20HmqcxfwYGl4tiR0ZkuHxvAk136OlNR0eihp8guD7uNLDqEY2jfD-lzuLXrP o1CPvxOj4eWDMF1kza6isxrYBdl MCjGARQeLRii-KJZWX PPD qwaB5lUO9bWD
Answer Key-PaperII
Q1)
Q2)
appropriate loop controls (1 mark), Correct Input for the array(1 mark), Incrementing
Hour (1 mark)
Hour ← 0
WHILE Hour < 24 DO
INPUT Temperature[Hour]
Hour ← Hour + 1
ENDWHILE
Q3)
a) Selection
(1 for correct syntax of CASE, 1 for all four cases, 1 for otherwise)
b) CASE OF RESPONSE
1: X=X+Y
2: X=X – Y
3: X=X*Y
4: X=X/Y
OTHERWISE OUTPUT “NO RESPONSE”
ENDCASE
Q4)
Q5) a)
((A NAND C)NOR A) OR (B AND C)
b) Four marks for eight correct outputs. Three marks for six or seven correct
outputs. Two marks for four or five correct outputs. One mark for two or
three correct outputs.
H A S W
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0
6) (1 mark for Decrypt, 1 mark for sub systems of encrypt and 1 mark for subsystems of
decrypt)
Decrypt
Input Plain Message
Output Cipher Text
Decryption Algorithm
Output Plain Message
Q9)
Length , Breadth , Depth are Global
Vol is local
Q10) a) The value of the variable Count begins as 0 and is incremented by 1 before it is
tested by the loop condition .Count will never be 0 at the end of the loop
b)
Q11) (1 mark for initializing first and last variables, 1 mark for correct Repeat Until with
Condition, 1 mark for correct FOR NEXT Loop, 1 mark for correct IF condition, 1 mark for
Swap elements,1 mark for decrementing Last variable)
Q12)
a) PCID-Text
Screensize -Integer
Type-Text
Price-Currency
(1 mark for condition and 1 mark for correct order by)
b) SELECT * FROM PCSTOCK WHERE HDD>1000 AND TYPE=”DT” ORDER BY price
DESC;
13)
14)
DECLARE HighestScore←0
//Declaration of Score[] to score the marks of each participant
DECLARE Score:Array [1:N] of INTEGER
DECLARE ParticipantCount←0
DECLARE AnswerCount←0
//Intializing the Score[] to value of 0 for all participants
FOR ParticipantCount←1 to N
Score[ParticipantCount]←0
NEXT ParticipantCount
// Matching the answers of each participant with the Key[], If the answer is correct Score, 1
mark will be added to the Score of participant
FOR ParticipantCount←1To N
FOR ScoreCount←1 to 5
IF answers[ParticipantCount, ScoreCount]=Key[ScoreCount]
THEN
Score[ParticipantCount]←Score[ParticipantCount]+1
ENDIF
NEXT ScoreCount
//Comparing the values to find the highest Scorer
IF Score[ParticipantCount]>HighestScore
THEN
HighestScore←Score[ParticipantCount]
ENDIF
OUTPUT “Score of Participant”,ParticipantCount,”=”, Score[ParticipantCount]
NEXT ParticipantCount
// Output all the participants who are highest scorer.
FOR ParticipantCount←1 TO N
IF Score[ParticipantCount]=HighestScore
THEN
OUTPUT “Highest Scorer”,Score[ParticipantCount]
NEXT ParticipantCount