Class 7 Computer Science – Answer Key
Question 1 (MCQ Answers)
A) d) Cookies
B) c) Firewall
C) b) Hacking
D) c) Using strong and unique passwords
Question 2 (True/False)
A) False
B) False
C) False (Default STEP is +1)
D) True
Question 3 – CODE 1
Iterations: 10 times
Output: 22
Dry Run Outputs
CODE 3 Output:
20 -1 14 11 8
0
CODE 4 Output:
-1 4
-1 2
-1 0
11 -7
Number System Answers
i) Positional value = 300
ii) Not valid octal number
iii) Octal = 13, Hexadecimal = B
iv) 20, 21
v) A to F
vi) 1010
10011.101(2) = 19.625(10)
2’s complement addition result = 101000(2)
Question 5 Short Answers
Trojan: Disguised as legitimate software, requires user action.
Worm: Self-replicates automatically.
Digital Footprint: Record of online activities.
Virus symptoms: Slow computer, unknown files/popups.
Parts of loop: Initialization, condition, increment/decrement.
Loop Control Variable: Controls loop repetitions.
QBASIC – Spy Number Program
CLS
INPUT "Enter number "; N
IF N < 100 THEN
PRINT "Invalid number"
END
END IF
S = 0
P = 1
WHILE N > 0
D = N MOD 10
S = S + D
P = P * D
N = N \ 10
WEND
IF S = P THEN
PRINT "Spy Number"
ELSE
PRINT "Not Spy Number"
END IF
END