0% found this document useful (0 votes)
119 views3 pages

Isc Computer Science Practical Specimen Paper 2016

The document contains 3 programming questions that involve binary numbers, word encryption, and matrix filling. The first question asks to write a program that takes a number as input, converts it to binary, counts the 1s, and outputs whether it is an "evil number" based on having an even or odd number of 1s. The second question involves encrypting words of a sentence by assigning numbers 1-26 to letters A-Z and adding the numbers for each word. The words should then be output in ascending order of their encrypted values. The third question asks to fill a square matrix with 3 given characters, with diagonals, diagonal intersections, and row/column intersections filled differently based on the characters. Sample inputs and outputs are
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views3 pages

Isc Computer Science Practical Specimen Paper 2016

The document contains 3 programming questions that involve binary numbers, word encryption, and matrix filling. The first question asks to write a program that takes a number as input, converts it to binary, counts the 1s, and outputs whether it is an "evil number" based on having an even or odd number of 1s. The second question involves encrypting words of a sentence by assigning numbers 1-26 to letters A-Z and adding the numbers for each word. The words should then be output in ascending order of their encrypted values. The third question asks to fill a square matrix with 3 given characters, with diagonals, diagonal intersections, and row/column intersections filled differently based on the characters. Sample inputs and outputs are
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

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

OUTPUT : IS THE THE SKY LIMIT

Example 1
INPUT : LOOK BEFORE YOU LEAP.
POTENTIAL : LOOK = 53
BEFORE = 51
YOU = 61
LEAP = 34

OUTPUT : LEAP BEFORE LOOK YOU

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.

Output the result in the format given below:

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

OUTPUT SIZE OUT OF RANGE

You might also like