Isc Computer Science Practical Specimen Paper 2016
Isc Computer Science Practical Specimen Paper 2016
Question 1.
An Evil number is a positive whole number which has even number of 1’s in its binary
equivalent. Example : Binary equivalent of 9 is 1001, which contains even number of 1’s. A
few even numbers are 3,5,6,9…..
Design a program to accept a positive whole number and find the binary equivalent of the
number and count the number of 1’s in it and display whether it is an Evil number or not with
an appropriate message.Output the result in the format given below:-
Example 1
INPUT : 15
BINARY EQUIVALENT : 1111
NO. OF 1’S : 4
OUTPUT : EVIL NUMBER
Example 2
INPUT : 26
BINARY EQUIVALENT : 11010
NO. OF 1’S : 3
OUTPUT : NOT AN EVIL NUMBER
Question 2.
The encryption of alphabets are to be done as follows :
A=1
B=2
C=3
.
.
.
Z=26
The potential of a word is found by adding the encrypted value of the alphabets.
Example : KITE
Potential = 11+ 9 + 20 + 5 = 45
Accept a sentence which is terminated either by a “.”, “,”, “?” or “!”. Each word of sentence
is sseparated by a single space. Decode the words according to their potential and arrange
them in ascending order.
1
Output the result in the format given below:-
Example 1
INPUT : THE SKY IS THE LIMIT.
POTENTIAL : THE = 33
SKY= 55
IS= 28
THE = 33
LIMIT = 63
Example 1
INPUT : LOOK BEFORE YOU LEAP.
POTENTIAL : LOOK = 53
BEFORE = 51
YOU = 61
LEAP = 34
Question 3.
Given a square matrix M[][] of order ‘n’. The maximum value possible for n is 10. Accept
three different characters from the keyboard and fill the array according to the instruction
given below:
Fill the upper and lower elements formed by the intersection of the diagonals by character 1.
Fill the left and right elements formed by the intersection of the diagonals by character 2.
Fill both diagonals by character 3.
Example 1.
ENTER SIZE : 4
INPUT : FIRST CHARACTER ‘*’
SECOND CHARACTER ‘?’
THIRD CHARACTER ‘#’
OUTPUT
#**#
?##?
?##?
#**#
2
Example 2.
ENTER SIZE : 5
INPUT : FIRST CHARACTER ‘$’
SECOND CHARACTER ‘!’
THIRD CHARACTER ‘@’
OUTPUT
@$$$@
!@$@!
!! @ ! !
!$$$@
Example 3.
ENTER SIZE : 65